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 102
    • Issues 102
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 4
    • Merge Requests 4
  • Requirements
    • Requirements
    • List
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • finesse
  • finesse3
  • Issues
  • #215

Closed
Open
Opened Jan 13, 2021 by Aaron Jones@aaron.jones💬Developer

Maxtem not enabled by default when user adds curved optic

Maxtem is not enabled by default when a user adds a curved optic. This can be quite misleading. I suggest adding a pre flight checks option to Model.run which is enabled by default and checks for these common user faux pas. This can be disabled by advanced users who are sure they know what they are doing.

Suggested meta-code includes adding the following to the Model class.

def pre_flight_checks(self):
    print('Running pre-flight-checks. This can be disabled by setting pre_flight_checks=False.')
    if self.__spatial_type == SpatialType.PLANE: 
       for _comp in self.__components:
            if isinstance(_comp, Surface):
                 if _comp.Rcx != np.inf or _comp.Rcx != np.inf:
                     warn('maxtem is not set, but a radius of curvature is specified in at least one componant. Offending component {_comp.name}. Enable with model.select_modes(maxtem=2) to correctly model gaussian modes.')
                     break
    print('Done')

And then adjusting the run method:


    def run(self,pre_flight_checks=True):
        if pre_flight_checks: self.pre_flight_checks()
        s = self.analysis.run(self)

Such code should probably also check for the existance of lens, gauss and cavity commands.

I think it is important that the user is alerted of the existance of this code, so that they know they can disable it for a speed boost.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Alpha 1
Milestone
Alpha 1
Assign milestone
Time tracking
None
Due date
None
Reference: finesse/finesse3#215