An interferometer modeling and ray tracing program
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fintrace-1.0.0a2.tar.gz.
File metadata
- Download URL: fintrace-1.0.0a2.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
286f8dc4a7f4a48d8dcc5913442c910a8d82c28d5188eb9861caee80c9d0f6be
|
|
| MD5 |
d0d831c664c3426f03368f4b2eb30ebb
|
|
| BLAKE2b-256 |
88e97eea41b3c3e15d78177497f2b04dabebe96838397b076fb17d3f4a245df7
|
File details
Details for the file fintrace-1.0.0a2-py3-none-any.whl.
File metadata
- Download URL: fintrace-1.0.0a2-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7c5cf6dcbcfd31e2755a30c97fc339e45024cc662c4a75aad8cba7f7fdc8a51
|
|
| MD5 |
1821b5c4cb6708a4bc11847c5eaaeff3
|
|
| BLAKE2b-256 |
d875f729cb255a09589d436446e6df59ed4ba420cde056e0c3505f58d85ed40d
|