Open tomeichlersmith opened 1 year ago
Hi, @tomeichlersmith.
Even without knowing much of the details on the alignment procedures, I am wondering whether some or most of this information should live in hps-java rather than hps-mc?
It doesn't feel like the right place to me for these kinds of parameters.
The reason I would put it here rather that in hps-java is because it would be used by the alignment components here. hps-java handles the parameter name <-> sensor/movement translation by using the calibrations database and a more detailed sensor mapping constructed from the detector description.
Here, we do not have access to the sensor mapping directly so it is easier to just store these files and read them in.
The reason I would put it here rather that in hps-java is because it would be used by the alignment components here. hps-java handles the parameter name <-> sensor/movement translation by using the calibrations database and a more detailed sensor mapping constructed from the detector description.
Here, we do not have access to the sensor mapping directly so it is easier to just store these files and read them in.
If you need heavy access to conditions, calibrations, detector data, etc. then hps-java is the logical place to write that code instead of within hps-mc where you don't have direct access to this information.
Would that be possible and feasible?
I don't know the exact details of what you're doing with this, but it just doesn't look quite right to me to put all this stuff into hps-mc.
This is hepful to have outside of hps-java because we need this information for two key alignment tasks:
While (1) could feasibly be done within hps-java, I refuse to do so out of principle[^1] since the core plotting scripts have already been written in Python.
(2) cannot be done in hps-java. It needs to be done manually by the aligner after looking at plots (or following a predetermined alignment plan). Having the human-readable form of the parameters accessible at this stage makes the choice a lot less error-prone.
[^1]: This is a sassy way to make a very real point. No-one working on alignment wants to spend more time on it than necessary, so re-writing all of our plotting/fitting functions in some other language would incur a lot of extra work that no-one wishes to take on.
The whitespace-separated text files do not have all of the information I would like to derive from a parameter mapping (for example, I'd love to separate axial/stereo without having to do a string-based search).
I'm imagining a JSON file that dumps more information than necessary. I'm thinking each parameter would be a dictionary and then the dictionary could have a few helpful entries
We could even go further and add more structure to this map to avoid repetition. We could define a "sensor" to be
And a "movement" to be
And then each millepede parameter would be