[INSTRM-1695] Validate new pfiDesign values. Created: 13/Sep/22  Updated: 14/Oct/22  Resolved: 07/Oct/22

Status: Done
Project: Instrument control development
Component/s: ics_cobraCharmer
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: cloomis Assignee: chyan
Resolution: Done Votes: 0
Labels: EngRun
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to INSTRM-1704 Current PFI XML contains incorrect L1... Won't Fix
Sprint: preEngRun08Nov

 Description   

When columns like L1,L2,tht[12],phi[12] are updated in the model, the values should be sanity checked, to at least detect and trap nans and non-physical values before they get used or saved to new calibration files.



 Comments   
Comment by cloomis [ 15/Sep/22 ]

For example, from a recent report:

On 14. Sep 2022, at 16:14, Javier Gracia Carpio <jgracia@mpe.mpg.de> wrote:

I had a quick look at the calibration product that we are supposed to use and it
contains 4 cobras with wrong L1 link lengths (should be less than 3mm).
These are their ids:

L1 = [141.01257827, 292.38620107, 345.00520847, 638.06690293]
moduleIds=[13, 23, 27, 27]
positionerIds=[54, 49, 12, 57]
serialIds= [1138, 2002, 1075, 3058]
Comment by jgracia [ 15/Sep/22 ]

Another thing to change is the phiIn and phiOut values for bad cobras. They seem to be set to 0 and -PI. However,  good cobras have phiIn and phiOut values that are arount -PI and 0. That means that the default values for bad cobras are inverted. They should have phiIn=-PI and phiOut=0

Comment by jgracia [ 15/Sep/22 ]

Many bad cobras seem to have L1 and L2 link lengths set to 0.  The examples with very large L1 values that cloomis mentions are also from bad cobras.

I think we should provide default link lengths for those cobras.

Comment by chyan [ 25/Sep/22 ]

I have uploaded a new XML file. In this new XML file, the bad measurements pf L1 and L2 are replaced by reasonable values (median of all L1 and L2 lengths).

Comment by hassan [ 07/Oct/22 ]

As he has commented above, Chi-Hung has already uploaded the latest cobra XML file with corrected information. Ticket closed.

Comment by jgracia [ 14/Oct/22 ]

Hi! Sorry for answering that late! I can confirm that the "problem" with the L1 and L2 lengths is solved. The problem with the phiIn, phiOut values for bad cobras is still present though.

I nee to do the following to correct the values:

badCobras = calibrationProduct.status != calibrationProduct.COBRA_OK_MASK
calibrationProduct.phiIn[badCobras] = -np.pi
calibrationProduct.phiOut[badCobras] = 0

 

The XML has  phiIn=0 and phiOut=-pi for bad cobras

Generated at Sat Feb 10 16:38:26 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.