desihub / desimodel

Code that reads and processes the desimodel data files.
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

Add support for CANbus failures in focalplane model #123

Open tskisner opened 4 years ago

tskisner commented 4 years ago

There are some events (e.g. a CANbus is disabled) which can bring many positioners offline temporarily. We could individually disable all affected positioners and then re-enable them, but it may be easier to have some "shortcut" line in the state log that could be translated into the resulting state impact when loading the model. Aspects to solving this are:

  1. Define the line syntax for such an event in the state log
  2. Include the CANbus information in the focalplane model
  3. Include a new synthetic exclusion polygon (circle at the patrol radius) that can be used when bulk-disabling many positioners
sbailey commented 4 years ago

Good idea. The CANbus controls groups of 50 positioners in each "cassette", but the mapping of each cassette to slitblocks is purposefully different for each petal. Cassettes cover either 1 or 2 contiguous regions on the focal plane. From DESI-2688:

image

The intended mapping is in DESI-2721 (when power is back), though I haven't double checked that the as-built mapping followed that (there were two petals that swapped their mapping but I don't know if we updated 2721 to match that). e.g. from DESI-2721 "cassette_order.txt" (which says "spectrograph sp0-sp9" but should have been referring to PetalID instead):

# Order of fiber cassettes on slit head for each spectrograph sp0 - sp9.
# These provide the mapping of groups of 50 fibers on the slit to
# positioners on the focal plane.  DESI-0530 provides the mapping
# of cassetteID 1-10 to positioner ID and focal x,y,z.
# This mapping of cassettes to slit location is based upon an example
# in DESI-2688.  Data Systems can request a different per-slit mapping
# prior to early summer 2017.

fibermin fibermax sp0 sp1 sp2 sp3 sp4 sp5 sp6 sp7 sp8 sp9
0   49    8  4  9 10  7  1  2  5  3  6
50  99    4  1  6  6 10  4  5  2  9  2
100 149   9  7  2  1  4  8 10  9  5  7
150 199   2  3  5  5  8  2  1  6  8 10
200 249   7  8  8  9  2  7  6 10  1  3
250 299   3  5  1  2  5 10  9  3  6  8
300 349  10  9  4  8  1  6  3  8  2  5
350 399   5  6  7  4  6  3  7  4 10  1
400 449   1 10  3  7  3  9  4  7  4  9
450 499   6  2 10  3  9  5  8  1  7  4

It looks like we don't have the cassette number tracked in the desimodel focalplane files, but we should add that (from a canonical as-build file/db, not from here).