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 5
    • Merge Requests 5
  • 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
  • Merge Requests
  • !30

Closed
Opened Sep 01, 2020 by Samuel Rowlinson@samuel.rowlinsonDeveloper
  • Report abuse
Report abuse

WIP: Coupled / compound parameters

  • Overview 1
  • Commits 1
  • Changes 6

Fixes #133 (closed)

This merge request makes adjustments to the xNaxis functions and StepParamND action to allow scanning of iterables of parameters. It also changes Surface.Rc to always return a tuple of the Rcx, Rcy model parameters so that these can be scanned simultaneously (without needing manual reference setting) due to the xaxis changes mentioned above.

If the parameter specified for an xaxis scan (for example) is an iterable of params (e.g. from Surface.Rc) then each parameter after the first in the iterable will be set to the ref of the first - thereby setting up temporary references such that these parameters will get set to the value of the first for each data point during the scan. All parameters will get reset to their initial values at the end of the xaxis analysis.

Currently this works when using the xNaxis functions, however it does not yet parse correctly due to the change made to Surface.Rc. The following error will occur:

Traceback (most recent call last):
  File "playground/homs/roc_scan_nomatrix.py", line 28, in <module>
    """
  File "/home/sam/Documents/phd/finesse_development/src/finesse/model.py", line 1270, in parse
    parse(text, model=self)
  File "/home/sam/Documents/phd/finesse_development/src/finesse/script/__init__.py", line 25, in parse
    return parser.parse(text, model=model)
  File "/home/sam/Documents/phd/finesse_development/src/finesse/script/base.py", line 44, in parse
    return self._do_parse(text, model, **kwargs)
  File "/home/sam/Documents/phd/finesse_development/src/finesse/script/parser.py", line 128, in _do_parse
    return self._build(parser, model)
  File "/home/sam/Documents/phd/finesse_development/src/finesse/script/parser.py", line 184, in _build
    _resolve_analysis_args(model, statement.args, statement.kwargs)
  File "/home/sam/Documents/phd/finesse_development/src/finesse/script/parser.py", line 27, in _resolve_analysis_args
    _resolve_analysis_args(model, *value[1])
TypeError: _resolve_analysis_args() argument after * must be an iterable, not finesse.element.Parameter

as Rc now returns a tuple rather than a single parameter even if the surface is non-astigmatic.

These changes also mean that a Parameter (or iterable of) must be passed to XNaxis for now rather than allowing a string too as before.

Assignee
Assign to
Reviewer
Request review from
Alpha 1
Milestone
Alpha 1
Assign milestone
Time tracking
Reference: finesse/finesse3!30
Source branch: feature/coupled_param_scans