Today we finished all the planned changes for the Metatron nodes and code; we list here all the changes, regarding all the Metatron nodes affected
SUS
The following changes have been introduced on the SUS* nodes:
-
SUS_PR.pyis not anymore a specific implementation but is now identical to all the other SUS* nodes by only importing the contents ofSUS.py; -
A
setOPTIC(optic)function has been introduced in SUS.py and it is called just after the "from SUS import *" on everySUS_*.pyfile. This is to avoid the error raised bySYSTEMbeing undefined at documentation generation time (viamake html); -
The
@handle_exceptionsdecorator has substituted thetry/exceptsections; -
The
ALIGN* andMISALIGN* states have been made consistent by using in both cases the sequence:-
The delta between the desired position on the
.inifile and the current position of the mirrors (from optical levers) is calculated; - The new DSP setpoint is calculated by adding the delta to the current DSP setting;
- The new setpoint is applied to the DSP
-
The delta between the desired position on the
-
Correspondingly all
SUS*.ini files have been updated by leaving only the entries:- xx_mar_tx_misalign
- xx_mar_ty_misalign
- xx_mar_tx_align
- xx_mar_ty_align
-
So, currently, the
SUS*.inifiles only contains references to the actual positions of the mirrors (as from optical lever channels on the DAQ) and no more references to the corresponding DSP setpoint (which may differ).
Overall tests have been made this morning by stopping all nodes, restarting them (and thus have them all in state INIT) and then bring the ITF_LOCK node to LOCKED_RECOMBINED (several times, including also the FmodERR tuning sequence).
ALL *_LOCK nodes, with the exception of OMC_LOCK
- all nodes are now properly documented, replacing comments with docstrings wherever needed, allowing the autogenerated documentation to be complete and up to date;
-
all nodes use the decorators provided by
META_library.pyfor the management of stalled nodes, Python exceptions, etc...Thetry/exceptblocks have been removed and are not needed anymore for these purposes; - the Acl photodiodes servers have been added and are handled like the LSC process, using the Acl/Python interface; they are needed solely for the purpose of demodulation phases' adjustments;
-
the additional '
root' logging level has been removed, as it was instantiated but not used; -
any node does NOTHING in the
DOWNstate: this means that if you want to use some node 'by hand', just put its manager toDOWNand you should be able to use it; if you can't, please report the issue; - all these nodes have now a common and standardized numbering scheme for the state indexes, which is the following:
| INDEX | STATE TYPE |
|---|---|
| 0 | INIT |
| 1 | DOWN |
| 2, .... 9 | (MIS)ALIGNING |
| 10, 11 | reserved |
| 12, ... 19 | (MIS)ALIGNED |
| 20, ... 39 | ACQUIRE |
| 40, ... 59 | LOCKING |
| 60, ... 79 | LOCKED |
The corresponding ensembles {ALIGNING, ALIGNED} and {ACQUIRE, LOCKING, LOCKED} have the last digit in common; this should be hopefully helpful for anyone who will go index-hunting on the DAQ.
-
For the same reason of helping people looking at states by quering names with scripts, every suitable state has now the corresponding prefix in its name (e.g,
LOCKED_ON_B7_BOOST_ON), and the corresponding error signal/photodiode used for the purpose in its name as well (e.g.,LOCKED_HF_B1p_B4_BROAD) -
the .ini configuration files are loaded and read ONLY in the
ACQUIREstate and not in multiple random places; - with the exception of trivial '0' and '1', ALL PARAMETERS and NUMBERS have been MOVED TO CONFIGURATION FILES;
NARM_LOCK / WARM_LOCK
These nodes are mostly unchanged, apart from the common changes and the following:
-
we added the states
(MIS)ALIGNED_NORTH_ENDand(MIS)ALIGNED_NORTH_ARM(with their own transient-INGstates, and the same applies to theWESTarm node), with the purpose of automating the PRNI/PRWI/CITF configurations (more info on those later in this entry); note that the(MIS)ALIGNED_NORTH_ENDstate effectively realigns the Input Mirror;
MICH_LOCK
This node has the same structure as before, but the mess of configurations and configuration names has been polished as far as possible. Not all the configurations have been tested, but the few ones that we are currently using; in any case, the logic for the configurations is exactly the same, so failures will have to be cured updating only the parameters, as probably the ITF conditions have changed in the meantime (threshold, phases, etc..); all the gains have been renormalized w.r.t. the new Beam Splitter magnets & coils.
In particular, the mid-fringe configuration we are using now is the LOCKED_HF_B1p_B4_BROAD state.
Some paths have been kept but deactivated (using the request=False directive in the state class), because they haven't been used in a long time, and because the maximum number of states which fit in the drop-down menu of the Metamedm screen is 15...
CARM_DARM_LOCK
This is the first new node we introduced; this node manages NARM_LOCK and WARM_LOCK, so unless you want to do unusual stuff, you should be able to just use this one; the starting point for this node was all the CARM/DARM stuff in ITF_LOCK, but there are new features:
- you can lock one arm, or both, and move from the former to the latter without losing the pre-existing lock; the state request for the lock of the arms is done with the B7/B8 signals with Boost on, as this is the standard configuration we use;
-
this node reads its own configuration file, and the ones of the single arm nodes: this is because the NArm and WArm loop gains are used to combine the signals for CARM/DARM; so the need of updating such vales in different places is gone, and an update of the single arm
.inifile will be enough; - the Drift Control is automatically turned on whenever one or both arms are requested to lock;
-
we added the
MISALIGNED_END_MIRRORS,MISALIGNED_ALL_BUT_NI,MISALIGNED_ALL_BUT_WIstates (and-INGtransients) to ease the automation of PRNI/PRWI/CITF fromITF_LOCK; these states do nothing but request the corresponding new states toNARM_LOCKandWARM_LOCK; -
the machine can bounce back and forth from
LOCKING_ARMSandLOCKED_ARMSwithout killing the lock of one surviving arm; -
the basis change from [NArm,Warm] to [CARM,DARM] and back seems a little smoother, due to some tuning of the
cmcommands' timing and ramptimes; -
the CARM_TO_MC path lies (obviously) in this node, with two possible configurations: B4_Q and B4_I_NORM; the latter, which is the one we use, is the one that is requested from
ITF_LOCK; the CARM_MC_SET offset is not read anymore from the configuration file, but is computed and removed online during the lock and written back on the configuration file, in case of need; - we kept the CARM_SLOW path and also a semi-dummy hand-off path for DARM, in the hope of not using the former ever again, and using the latter as soon as possible...
- this new DARM path and the CARM_TO_MC path can be chosen in both orders.
PRCL_LOCK
This is the second new node we added, which handles the lock of the PRCL degree of freedom; features:
- this node manages the SUS_PR node;
-
it has a
MISALIGNED_PRMstate, which is requested byITF_LOCKduring the lock of the arm cavities; this state lies on its own path; -
the analogous
ALIGNED_PRMstate is on the path for locking the PRNI/PRWI/CITF configurations; whenALIGNING_PRM, the Drift Control is automatically turned off; -
the PRNI/PRWI configurations are the same "PRX" path; it's
ITF_LOCKthat requests the needed mirrors to align/misalign; - the "CITF" and "PRITF" paths are the ones needed for such configurations, but remember that this node handles only the PRCL DOF;
-
in particular, the CITF_DF configuration is the one described some time ago in the Wiki, which is the one using B4_12MHz_I as trigger channel; I chose to implement this configuration as it will allow to lock on both carrier and sidebands just by modifying the
.inifile of this section, without the need of implementing new logic or even new states in this node; the same applies to the correspoding paths inMICH_LOCK; -
in order to avoid having every path to collapse into a single state in different times of its sequence, and since the diversity of those configurations, the realignment of the PR mirror is done within the "PRITF" paths, without going through the
ALIGNED_PRMstate; the Drift Control is turned off at the same time as the request for the PR mirror, like in the standalone state; - the misalignment of the PR mirror is requested by ITF_LOCK at the beginning of its own sequence;
-
there is one special edgeless state in
PRCL_LOCK, which isPRCL_LOCKLOSS. This is a 'waiting room' before going toDOWN, which is not used internally but is requested byITF_LOCKduring the main PRITF path: if we lose PRCL lock, nothing special happens andPRCL_LOCKstarts over fromACQUIRE_*; but if we lose everything during the realignment of PR and every node must go toDOWN,PRCL_LOCKgoes here instead, where we check that the PR mirror has finished its movement before requesting another one, and then we "jump" toDOWNsafely. In this way we avoid thatSUS_PRnode computes unreal and possibly dangerous deltas between DAQ and DSP with the result of kicking the PR mirror in random positions; this is helpful also foreseeing auto-relocking capabilities. In any case, this state turns off PRCL loop and actuation as theDOWNstate does.
ITF_LOCK
The main node has been somewhat simplified, and now really relies on managed nodes:
- the node manages INJ_MAIN, CARM_DARM_LOCK, MICH_LOCK and PRCL_LOCK;
- this is the only node where the main LSC.ENABLE switch is turned on/off;
-
the
DOWNstate asks all the DOF nodes to go toDOWNthemselves; after that it doesn't steal the nodes back and you can use the managed nodes by hand; -
as a general rule, in the case of some lockloss we tried to fall back to the last good place instead of blindly going back to
DOWN: for example, if MICH and PRCL are lost, but CARM/DARM survive , there is no need of starting back from scratch, but we can try to resume mid-way; -
the
LOCKING_ARMSstate requests theCARM_DARM_LOCKnode to lock the arms, MICH to stay inDOWNand PRCL to misalign the PR, unless thePRCL_LOCKLOSSsituation described above; in this case the node awaits thePRCL_LOCKnode to jump outsidePRCL_LOCKLOSS, and then the PRM gets misaligned; -
as anticipated, the
LOCKED_RECOMBINEDis the new, proper name for the oldSTEP3(NArm + WArm + MICH@HF with B1pB4 Diff over Sum); -
the
LOCKING_RECOMBINEDstate has the same failsafe for the PR mirror asLOCKING_ARMS: this is because no node can discriminate in which basis the arms are locked so, if we lose only MICH and PRCL during the realignment of PR, we fall back here and we ask again the PR mirror to misalign; this is complementary to bullet #3; -
the CARM_TO_MC and the PRITF_HF paths both begin after
LOCK_CARM_DARM, but are independent one from the other; nothing special happens on the CARM_TO_MC path, only state requests to theCARM_DARM_LOCKnode; -
the PRITF_HF path is a little bit different, given also the novelty of the configuration: it is the only place in this node where we actually do something other than state requests to managed nodes: during the
LOCKING_PRITF_HFstate the MICH_GAIN and MICH_SET are adjusted to reflect the different ITF status; when we will move towards dark fringe, the next-to-be-written states will be the place where to change these parameters again, rather than theMICH_LOCKnode; - the LOCKED_PRNI, LOCKED_PRWI and LOCKED_CITF_DF states just request the corresponding state to the managed nodes, without doing anything on their own.
We tested extensively all the modifications and new features and found no particular problems regarding Metatron itself. The real ITF configurations that we tested (multiple times) are:
- PRNI / PRWI: work fine, no issues;
- CITF: no issues from the points of view of Metatron, but I didn't manage to get the lock because of different ITF conditions; this "2f" configuration may need some adjustments w.r.t. the last time it was used (before the BS upgrade and several retunings of telescopes); will check first by hand ASAP.
- CARM_TO_MC: works fine, no issues;
- PRITF_HF: works fine, no issues.
You can find a scheme of the new node hierarchy in Figure 1, while in the attached file there are the state graphs for each node in its current state.
Both the old and the new Metatron userapps have been saved in the SVN and tagged as v1r0 and v2r0 respectively.
2 comments
The scripts generating the Metatron documentation have been updated to take into account the Python modules which have been added by Diego and Franco.
The status DAQ channels have been updated as well to incorporate the changes in the Metatron node states and indices. The CARM_DARM and PRCL status channels have been added to the existing ones:
V1:DQ_META_STATUS_BS
V1:DQ_META_STATUS_CARM_DARM
V1:DQ_META_STATUS_ITF
V1:DQ_META_STATUS_MICH
V1:DQ_META_STATUS_NARM
V1:DQ_META_STATUS_NE
V1:DQ_META_STATUS_NI
V1:DQ_META_STATUS_PR
V1:DQ_META_STATUS_PRCL
V1:DQ_META_STATUS_WARM
V1:DQ_META_STATUS_WE
V1:DQ_META_STATUS_WI