[INSTRM-1258] Update the fiberids.py accessor for the grandfibermap file Created: 28/Apr/21 Updated: 04/Jun/21 Resolved: 07/May/21 |
|
| Status: | Done |
| Project: | Instrument control development |
| Component/s: | pfs_utils |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Normal |
| Reporter: | cloomis | Assignee: | hassan |
| Resolution: | Done | Votes: | 0 |
| Labels: | SPS | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Story Points: | 3 | ||||||||||||||||||||||||||||||||
| Sprint: | SM1PD-2021 A8 | ||||||||||||||||||||||||||||||||
| Reviewers: | cloomis | ||||||||||||||||||||||||||||||||
| Description |
|
The raw data/fiberids/grandfibermap.xxx files are supposed to be wrapped by the code in fiberids.py. That still reads in the original JEG file, without all the changes in A few methods might be used by ics_cobraCharmer but I suspect not many, since necessary columns were not present. The original short ("mf", etc) column names in the data file were replaced by more meaningful ones ("fiberInModuleId", etc). Should decide whether anyone cares; perhaps just drop them. |
| Comments |
| Comment by rhl [ 28/Apr/21 ] |
Add proper module ID (no board)
Add methods as needed
cobraId vs. scienceFiberId? Why two, really?
fiducials? Separate class, probably.
Identify engineering/blank holes?
While you are working on this, can you file a ticket for each of these and include their numbers in this list? We shouldn't have any TODOs that aren't associated with a jira ticket. |
| Comment by cloomis [ 29/Apr/21 ] |
|
[ That is from an old comment in fiberids.py, I believe. Looks familiar. Did generate requests on some if the recent GFM tickets. Comment should be removed/updated. ] From the
That leaves the fiducial fibers and the "other methods". The fiducial fibers are described in another pfs_utils/data/fiberids/ data file, which is read in and used directly by some part of the per-exposure/per-field fps/mcs calibration scheme. I do not know enough about that to say whether/how that API should be formalized. |
| Comment by hassan [ 04/May/21 ] |
|
Main problem is that the reading in of the SuNSS fiberId was incorrect due to the wrong datatype for that column being specified. That has been fixed and a regression test added to trap situations in the future where changes are made to the data or corresponding fiber-related utilities. Changes are captured in https://github.com/Subaru-PFS/pfs_utils/pull/29 |
| Comment by rhl [ 06/May/21 ] |
|
See GH. I'm not sure that I like the masked array choice, and there's at least one typo. |
| Comment by rhl [ 06/May/21 ] |
|
As of this morning the values of fiberIds.sunssFiberId do not correspond to the values in the file. Please change this back; I'd like to see "emp" or None not --. The same goes for other missing fields, please either return the value in the file or None/NaN and remove the use of masked arrays. |
| Comment by hassan [ 07/May/21 ] |
|
In the latest push to the |
| Comment by hassan [ 07/May/21 ] |
|
Following slack discussion, a fill value of 65535 for unsigned integer fields is acceptable. |
| Comment by rhl [ 07/May/21 ] |
|
If it's not too late, can we rename MISSING_VALUE_UINT16 to e.g. MISSING_VALUE? The fact that that's a U16 number is irrelevant. |
| Comment by hassan [ 07/May/21 ] |
|
Not too late, and one of Paul's comments. Ok for MISSING_VALUE_INTEGER? If so, already pushed. |
| Comment by rhl [ 07/May/21 ] |
|
That's OK. The code will look like: if fieldId == MISSING_VALUE_INTEGER: continue and I personally think that the _INTEGER detracts from the readability as the type is irrelevant, but go with what you prefer. |
| Comment by hassan [ 07/May/21 ] |
|
I would also prefer to remove _INTEGER, but problem is that this value is only used for the integer types. The float types use np.nan. The string types propagate - or emp. |
| Comment by hassan [ 07/May/21 ] |
|
I've gone with rhl's suggestion and renamed to MISSING_VALUE. It's probably the most optimal name. |
| Comment by hassan [ 07/May/21 ] |
|
Merged to master. |