[DAMD-110] Add mapping of fibre to MTP connector to pfsConfig/Design Created: 27/Apr/21 Updated: 29/Jun/21 Resolved: 29/Jun/21 |
|
| Status: | Done |
| Project: | Data Model |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Normal |
| Reporter: | fmadec | Assignee: | rhl |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Story Points: | 2 | ||||||||||||||||||||
| Sprint: | 2DDRP-2021 A 4, 2DDRP-2021 A5, 2DDRP-2021 A 6 | ||||||||||||||||||||
| Description |
|
it would be nice to know to which MTP belong a given fiber. |
| Comments |
| Comment by cloomis [ 27/Apr/21 ] |
|
That is in the GFM file, though encoded in a slightly non-obvious way. |
| Comment by rhl [ 27/Apr/21 ] |
|
price How should we do this? Adding an extra column to the DESIGN/CONFIG tables would probably be best, but we'll have to think about backwards compatibility. |
| Comment by rhl [ 27/Apr/21 ] |
|
I think we need it in the pfsConfig as it looks as if e.g. we may need this information for sky subtraction. |
| Comment by price [ 28/Apr/21 ] |
|
I don't see the need to have it in the pfsConfig if it's in pfs_utils (pfs.utils.fiberids.FiberIds) and static. But if it's not static, then we need a way of minimally choosing the correct configuration. Having the relative transmission might be nice (though it's theoretically available through the fiberProfiles), but again I don't see the need to put it in the pfsConfig. |
| Comment by rhl [ 28/Apr/21 ] |
|
Currently the pipelines don't use anything accessed via pfs_utils, and I think it makes things more complicated if we have to start doing so. My concern is what we should do if MTPs move together (and I think that there's evidence for that). |
| Comment by price [ 28/Apr/21 ] |
|
We already distribute pfs_utils along with the 2D pipeline, and we use it to create pfsDesign files for DCB (makeDummyCableBDesign.py). |
| Comment by price [ 06/May/21 ] |
|
I think we agreed in a recent meeting that using the mapping in pfs_utils is sufficient. I propose closing this WONTFIX. |
| Comment by fmadec [ 07/May/21 ] |
|
well if so can we be sure that we have the proper API with pfs_utils and so a proper ticket? hassan ? |
| Comment by hassan [ 07/May/21 ] |
|
OK. Let me check. If there is missing/failing functionality I will file a new ticket. |
| Comment by rhl [ 07/May/21 ] |
|
I'm working on this (that is, I wrote the code). I assume that the name we want is e.g. D1-3-1 |
| Comment by fmadec [ 08/May/21 ] |
|
D1-3 tell us which mtp but not which fiber in the mtp connector, if I am correct D1-3-<specId>-<mtp position> |
| Comment by rhl [ 08/May/21 ] |
|
There are 4 of values per fibre (A, BA, BC, and C). So do you want me to return
("D0-1-1", (2, 26, 31, 7))
or something else? Or just the 4 raw strings, including the cobra number? |
| Comment by fmadec [ 08/May/21 ] |
|
it may be worth to have the complete information, no ? for my perspective I only need which mtp and position on Cable A but... so D0-1-x-26 for example or simply DO-1 according what I am looking for (mtp only for this last example) |
| Comment by hassan [ 10/Jun/21 ] |
|
As discussed during the DRP telecon on 2021-06-04, this functionality will be implemented in pfs_utils, not the datamodel. |
| Comment by rhl [ 16/Jun/21 ] |
Return MTP information for the specified fiberIds Args ---- fiberIds : array of 1-indexed fiberIds pfsConfig : `pfs.datamodel.PfsConfig` Tell us e.g. which fibres go to SuNSS Returns ------- an array of ("MTPID", (holes), cobraId) where "holes" are for the A, BA, BC, and C connectors, and cobraId is the 0-indexed global cobra ID For SuNSS, the "cobra ID" is negative, and its absolute value is the ID in the ferrule (for the imaging leg) or 127 + ID (for the diffuse leg) The usage is: import lsst.daf.persistence as dafPersist import pfs.utils.fiberids as fiberids butler = dafPersist.Butler("/projects/HSC/PFS/Subaru") dataId = dict(visit=45783, arm="r", spectrograph=1) pfsConfig = butler.get('pfsConfig', dataId) fiberIds = fiberids.FiberIds() fiberIds.fiberIdToMTP(pfsConfig.fiberId, pfsConfig)[100] which returns
('U1-2-1', [26, 2, 7, 31], -51)
(where -51 indicated an imaging SuNSS "cobra"). |
| Comment by rhl [ 16/Jun/21 ] |
|
Pushed to tickets/ |
| Comment by hassan [ 18/Jun/21 ] |
|
Proposed changes in branch look fine. |
| Comment by hassan [ 29/Jun/21 ] |
|
Merged to master. |