Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
F
finesse3
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 81
    • Issues 81
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 6
    • Merge Requests 6
  • Requirements
    • Requirements
    • List
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • finesse
  • finesse3
  • Milestones
  • Alpha 1

Open
Milestone

Alpha 1

This is intended to correspond to a "release" version for current Finesse veterans in the community to test so that we can receive feedback and bug reports from users who have experience in running Finesse 2 simulations.

The main feature to demonstrate in Alpha 1 will be the new syntax. This feature should be more or less finished by this release. Other parser-related new features such as unparsing in the same order as the parsed file (#200) are less critical for Alpha 1.

Required features

Below are sections identifying required features for an initial alpha release. Associated source files linked to these topics are given where relevant.

Parsing kat files

  • Legacy mode
    • Any missing things we need to support from old syntax? Maybe some funny commands missing (PHIL: CREATE ISSUE)
    • Relevant issues #167, #185
    • Make sure all known failures get handled correctly
      • Proper syntax error handling / reporting -> Relevant issue [PUT NUMBER HERE]
      • Documentation page for legacy syntax
    • Relevant files:
      • finesse/script/legacy.py
      • finesse/model.py (see Model.parse_legacy, Model.parse_legacy_file)
  • New features & syntax
    • Merge Requests (!33)
    • Needs examples
    • Documentation page for new syntax (#187)
    • Define feature-set to advertise for Alpha 1 -> this feature-set should be documented and tested
      • Testing related issues (#72, #45)
    • Relevant files:
      • Sub-module: finesse/script
      • finesse/model.py (see Model.parse, Model.parse_file)

Basic plane-wave simulations

  • Optimised matrix / rhs filling for components:
    • Mirror
      • Relevant files:
        • finesse/components/mirror.py (see Mirror._get_workspace)
        • finesse/components/modal/mirror.pyx (see c_mirror_fill)
    • Beamsplitter
      • Relevant files:
        • finesse/components/beamsplitter.py (see Beamsplitter._get_workspace)
        • finesse/components/modal/beamsplitter.pyx (see c_beamsplitter_fill)
    • Space
      • Relevant files:
        • finesse/components/space.py (see Space._get_workspace)
        • finesse/components/modal/space.pyx (see c_space_fill)
    • Laser
      • Relevant files:
        • finesse/components/laser.py (see Laser._get_workspace)
        • finesse/components/modal/laser.pyx (see c_laser_fill_rhs)
    • Modulator (implemented but not yet optimised)
      • Relevant files:
        • finesse/components/modal/modulator.pyx (see modulator_fill)
    • Isolator
      • Relevant files:
        • finesse/components/isolator.py (see Isolator._fill_matrix)
    • Photodiode
      • Relevant files:
        • finesse/components/photodiode.py (see Photodiode._fill_matrix)
  • Optimised detector output computations:
    • Power detector
      • Relevant files:
        • finesse/detectors/compute/power.pyx (see PDWorkspaces and related functions)
    • Amplitude detector
      • Relevant files:
        • finesse/detectors/compute/power.pyx (see ADWorkspace and related functions)
    • Cavity detector (for non-HOM stuff like FSR, FWHM, etc.)
  • Scanning of non-HOM-related model parameters (e.g. detunings, reflectivity, transmission, ...)

Higher Order Modes (HOMs) for simulations

The required features for performing HOM simulations are listed below. For a first alpha release, we do not expect that aperture or map calculations will be implemented so they have been intentionally left out. These extra coupling effects will be implemented in later releases.

  • Optimised beam tracing
    • ABCD matrices for all components
    • Cavity object
      • Relevant files:
        • finesse/components/cavity.py
    • Gauss object (i.e. gauss command in old Finesse)
      • Relevant files:
        • finesse/gaussian.py (see Gauss)
    • Efficient determination of changing beam parameters
      • Relevant files:
        • finesse/tracing/ctracer.pyx (see TraceForest.make_changing_forest)
        • finesse/simulations/base.pyx (see BaseSimulation._determine_changing_beam_params)
    • Optimised propagation during simulation
      • Relevant files:
        • finesse/simulations/base.pyx (see BaseSimulation.trace_beam)
    • Documentation of beam tracing options (PUT ISSUE HERE)
  • Gouy phase calculations:
    • over spaces
      • Relevant files:
        • finesse/components/modal/space.pyx (see set_gouy_phase)
    • for Laser TEMs
      • Relevant files:
        • finesse/components/modal/laser.pyx (see set_tem_gouy_phases)
  • Selection of HG modes to model
    • via maxtem
    • through "typed" selection method (i.e. "even", "tangential" etc.)
    • Relevant files:
      • finesse/model.py (see Model.select_modes)
  • Optimised scattering matrix (BH knmn'm' calculations):
    • Mirror
    • Beamsplitter
    • Lens
    • Modulator
    • Isolator
    • Relevant files:
      • finesse/knm.pyx (this contains code for generic BH scattering matrix calculations)
      • All corresponding files in finesse/components/modal (see functions mention knm_workspaces)
  • Optimised detector output computations
    • Power detector
      • standard calculations (summing over mode indices)
        • Relevant files:
          • finesse/detectors/compute/power.pyx (see PDWorkspaces and related functions)
      • masks (need to be re-implemented efficiently, not difficult) (Issue: )
      • custom / split PDs (same as above) (Issue: )
    • Amplitude detector
      • Relevant files:
        • finesse/detectors/compute/power.pyx (see ADWorkspace and related functions)
    • Cameras (intensity & amplitude versions)
      • Pixel
      • ScanLine
      • Full image
      • Relevant files:
        • finesse/detectors/camera.py
        • finesse/detectors/compute/camera.pyx
    • Beam properties (e.g. q, w, w0, ...)
      • Relevant files:
        • finesse/detectors/bpdetector.py
        • finesse/detectors/compute/gaussian.pyx (see c_bp_detector_output)
    • Cavity properties
      • Relevant files:
        • finesse/detectors/cavity_detector.py
        • finesse/detectors/compute/gaussian.pyx (see c_cp_detector_output)
    • Accumulated Gouy phase
      • Relevant files:
        • finesse/detectors/gouy.py
    • Direct coupling coefficient (knm) detection
      • Relevant files:
        • finesse/detectors/knmdetector.py
        • finesse/detectors/compute/power.pyx (see c_knm_detector_output)
  • Scanning of HOM-related model parameters

Signal matrix computations

  • Signal generator object
  • Optimised signal matrix / rhs filling:
    • Signal generator
    • Mirror
    • Beamsplitter
    • Laser
    • Space
      • GW signal node (Issue?:)
    • Computing multiple signal injections at once (Issue:)
      • sensing matrix
      • handling of operating points
  • Detectors:
    • Amplitude detector
    • Demodulated pds
    • MotionDetector
    • ComplexCameras

Quantum noise

(Phil, Dan - create list of features here)

Suggestions:

  • Building of noise matrix
  • qnoised detector

Radiation pressure

  • Plane-wave
  • HOM effects (Issue:?)
    • Torsional optical spring
  • Utilities / initial framework for control part (Issue:?)

CLI

  • Improvements to CLI (see #139)

General simulation utilities

  • Axis scan actions (i.e. xaxis, x2axis, ...)
    • Relevant files:
      • finesse/analysis/actions.py (see StepParamND and various Xaxis objects)
      • finesse/analysis/axes.py
      • finesse/analysis/runners.pyx (see run_axes_scan)
    • Documentation of actions (Issue:?)
  • Solution object (from axis scans)
    • Access of detector outputs
    • Plotting
      • Relevant files:
        • finesse/plotting/plot.py (see Plotter)
    • Serialisation(?)
    • Relevant files:
      • finesse/solutions/array.pyx (see ArraySolution)
    • Documentation of solution object (Issue:?)
  • Locking (Issue:?)

API improvements

These refer to enhancements to interacting with Finesse for end-users; including features such as better error handling, improved CLI options and convenient methods / actions for performing common tasks.

  • Sensible, and complete, model parameter validation (see #123)
  • Sanity checking on non-model-parameter (info_parameter) variables (see #86)
  • Reduce import times (see #135)

Optimisations

Performance is pretty good now that we are using Cythonised workspaces, with most of the code hit during a simulation being pure C at this point. There are a few areas for improvement still, however, which (of course) involve getting rid of more CPython interactions during the simulation loop(s).

Would be nice to do these but not strictly necessary for Alpha 1.

  • Main thing to optimise now is symbolic expression code. These are still heavily Python dependent (as the operations are Python based rather than C based). This must be converted to C somehow, via JIT compilation for example. There are some ideas for this in #107.
  • The next most important optimisation to do is Cythonising of model parameter validation. Again, issues #107 and #123 (see comments on this one) mention possible solutions for this.

Testing

Need to make more comprehensive list here -> discuss on future call.

  • Radiation pressure plane-waves
  • GW detector pre-tuning files
  • Beam tracing
    • Full LIGO file -> overlapping cavities and such (PUT ISSUE HERE)

Documentation

(Speak to Aaron about documenting stuff)

  • General documentation issue: (?)
  • Documenting custom component creation with particularly attention paid to linking to Cython workspaces

Desirable features

The features listed here would be nice to have in the initial release, however are not absolutely necessary for now.

Extra features

These are features which tend not to be linked with Finesse simulations in the traditional sense, but provide additional utilties which will be useful outside of a simulation context.

Beam propagation

  • Propagation of a beam with arbitrary q over any path of the model
    • Numeric propagation
    • Symbolic propagation
    • Solution object for propagated beam results
      • Access of key properties such as q, w at nodes / comps
      • Attribute(s) and methods for determining total acc. Gouy and Gouy phase accumulated over each space of the path
      • Plotting of the propagated beam in terms of:
        • Beam size
        • Accumulated Gouy phase
        • Wavefront curvature
      • Relevant files:
        • finesse/solutions/beamtrace.py (see PropagationSolution)
    • Relevant files:
      • finesse/tracing/tools.pyx (see propagate_beam)
      • Can also compute via: finesse/model.py (see Model.propagate_beam)
  • Compute accumulated Gouy phase over any path of the model
    • Relevant files:
      • finesse/model.py (see Model.acc_gouy)
      • Note: this can also be found with the generic function: propagate_beam (see first point in this section)
  • Calculate composite ABCD matrix over any path of the model
    • Relevant files:
      • finesse/model.py (see Model.ABCD)
      • Note: this can also be found with the generic function: propagate_beam (see first point in this section)

Internal code structure refactoring

The list below details code accessibility / readability issues which should be solved. This is mainly for development purposes to make it easier for new (and current!) developers to understand / remember where specific features are and where new features should go.

Note that much of the below could be considered a matter of opinion, not all of these changes might need to be made

  • finesse/components/matrixfill.pyx needs re-organising, specifically:
    • OutputFuncWrapper needs to be somewhere in finesse/detectors...
    • ... as does DetectorWorkspace
    • ConnectorWorkspace (and ElementWorkspace) should probably also sit somewhere else
      • In fact, this whole file probably needs refactoring so that pretty much only FillFuncWrapper is left there
  • finesse/detectors/compute/power.pyx is quite bloated, things to address:
    • as of 61f68851 at least (last change to this file as of writing), lines 561 onwards seem obsolete
    • the file contains ADWorkspace and associated functions + KnmDetectorWorkspace and associated function, these probably should go in a different Cython file in same directory.
  • Quite a lot is going on in finesse/analysis/actions.py, common action types should possibly be refactored into separate files.
  • finesse/element.pyx is in a particularly bad state as of writing, things to address:
    • This file should probably only contain the ModelElement class and the model_parameter, info_parameter decorators. All else needs moving, see below.
    • Symbolic related objects (Symbol, Constant, Operation) and functions (display, evaluate, as_symbol) should be moved to a new finesse/symbols.pyx file; this has also been mentioned in #117.
    • Parameter related objects (Parameter, GeometricParameter, ParameterRef, _parameter) should be moved to a new finesse/parameter.pyx file.
  • (Unsure on this one) finesse/model.py is a particularly huge file, but this may be unavoidable anyway due to it inherently being the "main object" through which users would interact with their configuration in an OOP way.
  • Issues 100
  • Merge Requests 18
  • Participants 6
  • Labels 9
66% complete
66%
Start date
No start date
None
Due date
No due date
100
Issues 100 New issue
Open: 34 Closed: 66
None
Total issue weight
None
18
Merge requests 18
Open: 2 Closed: 4 Merged: 12
0
Releases
None
Reference: finesse/finesse3%"Alpha 1"