This release is a pre-release and may not be stable for production use.
fintrace
Description
This repository is meant to be a generalized combination of finesse and gtrace, two interferometer modeling packages. Through the CLI you can create both a Finesse model as well as gtrace to create a physical picture of your setup. Currently, only .yaml files are accepted as input for the models, and the syntax of them must be very specific; error messages and helpful text are being added.
You can also use this created model just like you would use a Finesse model, as it inherits from Model; that is to say we can do all of the interferometric modeling we would be able to do with Finesse with the created Fintrace model. See the documentation for examples.
Installation
This repository uses its own conda environment fintrace, which can be installed with instructions below. The environment must be activate when running scripts.
To install:
Make sure that you have a python package manager installed such as conda or mamba.
Anaconda
mamba
- cd into the desired folder you'd like to place this repository
cd /path/to/desired/folder
- git clone this repo, then
cdinto it
git clone git@gitlab.com:mactodd315/fintrace.git
cd fintrace
- build the
fintraceenvironment contained inenvironment.yml:
conda env create -f environment.yml
or
mamba env create -f environment.yml
- Then, enter the environment:
conda activate fintrace
or
mamba activate fintrace
You should see (fintrace) written before the beginning of your terminal prompt, indicating everything was built successfully.
- Finally, the code in this repository makes heavy use of the cosmic explorer repo, so it must also be cloned and installed. Clone the cosmic-explorer repo inside some repos folder (it doesn't matter where) and install it:
cd /path/to/repos folder
git clone git@gitlab.com:cosmic-explorer/cosmic-explorer.git
cd cosmic-explorer
pip install -e .
Then to get back to fintrace, cd back and install it.:
cd /path/to/fintrace
pip install -e .
You should successfully be able to run code.
Usage
To use, one must create a .yaml file with the right syntax, describing the locations and properties of each optic in the model. Generally, the more specific you are about each optic, the better; however, the examples provided show a good minimum number of parameters for each.
Connections are described using the Finesse syntax, so the user must know how the optical system will be connected before hand.
As an example, the bowtie.yaml features 4 mirrors, however all of them are technically beamsplitters in the .yaml file because of a non-zero angle of incidence. If you know an optic will have a zero angle of incidence, you should consider its type to be Mirror. Using a cavity declaration shown in this example file, we can produce a beam trace of the eigenmode by running:
fintrace_plot_yaml bowtie_test.yaml --gtrace figures/bowtie_cavity --beam-origin cavity --draw-width --grid
Metadata
Release files for fintrace 1.0.0a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fintrace-1.0.0a2.tar.gz | 30.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fintrace-1.0.0a2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.6 kB
Release files / fintrace-1.0.0a2.tar.gz
| Download URL | fintrace-1.0.0a2.tar.gz |
|---|---|
| Size | 30.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
286f8dc4a7f4a48d8dcc5913442c910a8d82c28d5188eb9861caee80c9d0f6be
|
|
BLAKE2b-256 checksum How to use checksums |
88e97eea41b3c3e15d78177497f2b04dabebe96838397b076fb17d3f4a245df7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.14
|
Release files / fintrace-1.0.0a2-py3-none-any.whl
| Download URL | fintrace-1.0.0a2-py3-none-any.whl |
|---|---|
| Size | 29.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7c5cf6dcbcfd31e2755a30c97fc339e45024cc662c4a75aad8cba7f7fdc8a51
|
|
BLAKE2b-256 checksum How to use checksums |
d875f729cb255a09589d436446e6df59ed4ba420cde056e0c3505f58d85ed40d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.14
|