<commit_before>#- sv3 primary survey targets bit mask: dark survey + calib +
sv3_desi_mask:
    - [LRG,         0, "LRG", {obsconditions: DARK}]
    - [ELG,         1, "ELG", {obsconditions: DARK}]
    - [QSO,         2, "QSO", {obsconditions: DARK}]

    #- ADM QSO sub-classes
    - [QSO_HIZ,     4, "QSO selected using high-redshift Random Forest (informational bit)", {obsconditions: DARK}]

    # ADM ELG sub-classes
    # ADM ELG_LOP was deprecated early in SV3. We just use "ELG" for the low-priority ELGs.
    - [ELG_LOP,     5, "ELG at lower priority",  {obsconditions: DARK}]
    - [ELG_HIP,     6, "ELG at higher priority", {obsconditions: DARK}]

    #- North vs. South selections
    - [LRG_NORTH,      8, "LRG cuts tuned for Bok/Mosaic data",               {obsconditions: DARK}]
    - [ELG_NORTH,      9, "ELG cuts tuned for Bok/Mosaic data",               {obsconditions: DARK}]
    - [QSO_NORTH,     10, "QSO cuts tuned for Bok/Mosaic data",               {obsconditions: DARK}]
    - [ELG_LOP_NORTH, 11, "ELG at lower priority tuned for Bok/Mosaic data",  {obsconditions: DARK}]
    - [ELG_HIP_NORTH, 12, "ELG at higher priority tuned for Bok/Mosaic data", {obsconditions: DARK}]

    - [LRG_SOUTH,     16, "LRG cuts tuned for DECam data",                    {obsconditions: DARK}]
    - [ELG_SOUTH,     17, "ELG cuts tuned for DECam data",                    {obsconditions: DARK}]
    - [QSO_SOUTH,     18, "QSO cuts tuned for DECam data",                    {obsconditions: DARK}]
    - [ELG_LOP_SOUTH, 19, "ELG at lower priority tuned for DECam data",       {obsconditions: DARK}]
    - [ELG_HIP_SOUTH, 20, "ELG at higher priority tuned for DECam data",      {obsconditions: DARK}]

    #- Calibration targets
    - [SKY,         32, "Blank sky locations",
        {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18}]
    - [STD_FAINT,   33, "Standard stars for dark/gray conditions", {obsconditions: DARK|GRAY}]
    - [STD_WD,      34, "White Dwarf stars", {obsconditions: DARK|GRAY|BRIGHT}]
    - [STD_BRIGHT,  35, "Standard stars for BRIGHT conditions",
        {obsconditions: BRIGHT}]
    - [BAD_SKY,      36, "Blank sky locations that are imperfect but still useable",
        {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18}]
    - [SUPP_SKY,      37, "SKY is based on Gaia-avoidance (SKY will be set, too)",
        {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18}]

    #- Reserving some bits that we may not use
    # - [STD_FAINT_BEST,   38, "High quality faint standard stars",  {obsconditions: DARK|GRAY}]
    # - [STD_BRIGHT_BEST,  39, "High quality bright standard stars", {obsconditions: BRIGHT}]

    #- Reserved convenience bits that can, e.g., be set downstream of desitarget
    - [NO_TARGET,   49, "No known target at this location",
        {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18}]

    #- Related to bright object masking
    - [BRIGHT_OBJECT,       50, "Known bright object to avoid", {obsconditions: APOCALYPSE}]
    - [IN_BRIGHT_OBJECT,    51, "Too near a bright object; DO NOT OBSERVE", {obsconditions: APOCALYPSE}]
    - [NEAR_BRIGHT_OBJECT,  52, "Near a bright object but ok to observe",
            {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18}]

    #- A bit for another survey is set
    - [BGS_ANY,             60, "Any BGS bit is set", {obsconditions: IGNORE}]
    - [MWS_ANY,             61, "Any MWS bit is set", {obsconditions: IGNORE}]
    - [SCND_ANY,            62, "Any secondary bit is set",
        {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18}]

#- Bright Galaxy Survey
sv3_bgs_mask:
    - [BGS_FAINT,           0, "BGS faint targets",                     {obsconditions: BRIGHT}]
    - [BGS_BRIGHT,          1, "BGS bright targets",                    {obsconditions: BRIGHT}]
    - [BGS_WISE,            2, "BGS wise targets (AGN-like)",           {obsconditions: BRIGHT}]
    - [BGS_FAINT_HIP,       3, "BGS faint targets at bright priorty",   {obsconditions: BRIGHT}]

    #- BGS North vs. South selections
    - [BGS_FAINT_NORTH,     8, "BGS faint cuts tuned for Bok/Mosaic",              {obsconditions: BRIGHT}]
    - [BGS_BRIGHT_NORTH,    9, "BGS bright cuts tuned for Bok/Mosaic",             {obsconditions: BRIGHT}]
    - [BGS_WISE_NORTH,      10, "BGS WISE cuts tuned for Bok/Mosaic",              {obsconditions: BRIGHT}]
    - [BGS_FAINT_SOUTH,     16, "BGS faint cuts tuned for DECam",                  {obsconditions: BRIGHT}]
    - [BGS_BRIGHT_SOUTH,    17, "BGS bright cuts tuned for DECam",                 {obsconditions: BRIGHT}]
    - [BGS_WISE_SOUTH,      18, "BGS WISE cuts tuned for DECam",                   {obsconditions: BRIGHT}]

#- Milky Way Survey
sv3_mws_mask:

    # First layer defines main samples -- these are expected to have distinct
    # input catalogues.

    #- Bits 0-3 (7 ids)
    - [MWS_BROAD,           0, "Milky Way Survey magnitude limited bulk sample",         {obsconditions: BRIGHT}]
    - [MWS_WD,              1, "Milky Way Survey White Dwarf",                           {obsconditions: BRIGHT|GRAY|DARK}]
    - [MWS_NEARBY,          2, "Milky Way Survey volume-complete ~100pc sample",         {obsconditions: BRIGHT}]

    # Second layer flags additional subclasses that could apply to any
    # of the main classes. These sort targets in each input catalog into
    # distinct groups for the purpose of assigning priorities and observing
    # conditions.

    # e.g. MWS_MAIN & MWS_LOW_GAL_B & MWS_MAIN_FAINT & MWS_PLX & MWS_REOBS

    # => A main sample star at low galactic latitude, faint enough to be
    # considered filler but with parallax factored into the subpriority and
    # targeted for reobservation if possible.

    #- 4: MWS_BROAD north/south splits
    - [MWS_BROAD_NORTH,     4, "Milky Way Survey cuts tuned for Bok/Mosaic",               {obsconditions: BRIGHT}]
    - [MWS_BROAD_SOUTH,     5, "Milky Way Survey cuts tuned for DECam",                    {obsconditions: BRIGHT}]

    #- 6: MWS BHBs
    - [MWS_BHB,             6, "Milky Way Survey Blue Horizontal Branch stars", {obsconditions: BRIGHT|GRAY|DARK}]

    #- 8: Sub-classes of MWS_MAIN
    - [MWS_MAIN_BLUE,       8, "Milky Way Survey magnitude limited blue sample",              {obsconditions: BRIGHT}]
    - [MWS_MAIN_BLUE_NORTH, 9, "MWS magnitude limited blue sample tuned for Bok/Mosaic",      {obsconditions: BRIGHT}]
    - [MWS_MAIN_BLUE_SOUTH, 10, "MWS magnitude limited blue sample tuned for DECam",          {obsconditions: BRIGHT}]
    - [MWS_MAIN_RED,        11, "Milky Way Survey magnitude limited red sample",              {obsconditions: BRIGHT}]
    - [MWS_MAIN_RED_NORTH,  12, "MWS magnitude limited red sample tuned for Bok/Mosaic",      {obsconditions: BRIGHT}]
    - [MWS_MAIN_RED_SOUTH,  13, "MWS magnitude limited red sample tuned for DECam",           {obsconditions: BRIGHT}]

    # ADM Standard stars based only on Gaia.
    - [GAIA_STD_FAINT,      33, "Standard stars for dark/gray conditions",   {obsconditions: DARK|GRAY}]
    - [GAIA_STD_WD,         34, "White Dwarf stars",                         {obsconditions: DARK|GRAY|BRIGHT}]
    - [GAIA_STD_BRIGHT,     35, "Standard stars for BRIGHT conditions",      {obsconditions: BRIGHT}]

    # ADM back-up targets for poor conditions and as filler.
    - [BACKUP_BRIGHT,       60, "Bright backup Gaia targets",   {obsconditions: BACKUP|TWILIGHT12|TWILIGHT18}]
    - [BACKUP_FAINT,        61, "Fainter backup Gaia targets",  {obsconditions: BACKUP|TWILIGHT12|TWILIGHT18}]
    - [BACKUP_VERY_FAINT,   62, "Even fainter backup Gaia targets",  {obsconditions: BACKUP|TWILIGHT12|TWILIGHT18}]

#- ADM SV secondary survey targets bit mask.
#- ADM note that the 'filenames', here, should all be present in the
#- ADM directory that corresponds to the $SCND_DIR/sv3 environment
#- ADM variable, e.g. $SCND_DIR/sv3/veto.txt for VETO targets.
#- ADM downsample is the fraction of targets to read from the input file
#- ADM i.e. downsample: 0.13 means "read first 13% of targets from file."
sv3_scnd_mask:
    - [VETO,                    0, "Never observe, even if a primary target bit is set",
        {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18, filename: 'veto', flavor: 'SPARE', downsample: 1}]
    - [UDG,                     1, "See $SCND_DIR/sv3/docs/UDG.txt",                  {obsconditions: DARK,             filename: 'UDG',                 flavor: 'SPARE',  downsample: 1}]
    - [FIRST_MALS,              2, "See $SCND_DIR/sv3/docs/FIRST_MALS.txt",           {obsconditions: DARK,             filename: 'FIRST_MALS',          flavor: 'SPARE',  downsample: 1}]
    - [QSO_RED,                 5, "See $SCND_DIR/sv3/docs/QSO_RED.ipynb",            {obsconditions: DARK,             filename: 'QSO_RED',             flavor: 'QSO',    downsample: 1}]
#   - [MWS_DDOGIANTS,           9, "See $SCND_DIR",                                   {obsconditions: BRIGHT,           filename: 'MWS_DDOGIANTS',       flavor: 'SPARE',  downsample: 1}]
    - [MWS_CLUS_GAL_DEEP,      10, "See $SCND_DIR/sv3/docs/MWS_CLUS_GAL_DEEP.txt",    {obsconditions: DARK,             filename: 'MWS_CLUS_GAL_DEEP',   flavor: 'SPARE',  downsample: 1}]
    - [LOW_MASS_AGN,           11, "See $SCND_DIR/sv3/docs/LOW_MASS_AGN.txt",         {obsconditions: DARK,             filename: 'LOW_MASS_AGN',        flavor: 'SPARE',  downsample: 1}]
    - [FAINT_HPM,              12, "See $SCND_DIR/sv3/docs/FAINT_HPM.txt",            {obsconditions: DARK,             filename: 'FAINT_HPM',           flavor: 'SPARE',  downsample: 1}]
    - [LOW_Z_TIER1,            15, "See $SCND_DIR/sv3/docs/LOW_Z_TIER1.ipynb",        {obsconditions: DARK,             filename: 'LOW_Z_TIER1',         flavor: 'SPARE',  downsample: 1}]
    - [LOW_Z_TIER2,            16, "See $SCND_DIR/sv3/docs/LOW_Z_TIER2.ipynb",        {obsconditions: DARK,             filename: 'LOW_Z_TIER2',         flavor: 'SPARE',  downsample: 1}]
    - [LOW_Z_TIER3,            17, "See $SCND_DIR/sv3/docs/LOW_Z_TIER3.ipynb",        {obsconditions: DARK,             filename: 'LOW_Z_TIER3',         flavor: 'SPARE',  downsample: 1}]
    - [BHB,                    18, "See $SCND_DIR/sv3/docs/BHB.txt",                  {obsconditions: DARK,             filename: 'BHB',                 flavor: 'SPARE',  downsample: 1}]
    - [SPCV,                   19, "See $SCND_DIR/sv3/docs/SPCV.txt",                 {obsconditions: DARK,             filename: 'SPCV',                flavor: 'SPARE',  downsample: 1}]
    - [DC3R2_GAMA,             20, "See $SCND_DIR/sv3/docs/DC3R2_GAMA.ipynb",         {obsconditions: DARK,             filename: 'DC3R2_GAMA',          flavor: 'SPARE',  downsample: 0.02}]
    - [PSF_OUT_BRIGHT,         25, "See $SCND_DIR/sv3/docs/PSF_OUT_BRIGHT.txt",       {obsconditions: BRIGHT,           filename: 'PSF_OUT_BRIGHT',      flavor: 'SPARE',  downsample: 1}]
    - [PSF_OUT_DARK,           26, "See $SCND_DIR/sv3/docs/PSF_OUT_DARK.txt",         {obsconditions: DARK,             filename: 'PSF_OUT_DARK',        flavor: 'SPARE',  downsample: 1}]
    - [HPM_SOUM,               27, "See $SCND_DIR/sv3/docs/HPM_SOUM.txt",             {obsconditions: DARK,             filename: 'HPM_SOUM',            flavor: 'SPARE',  downsample: 1}]
    - [SN_HOSTS,               28, "See $SCND_DIR/sv3/docs/SN_HOSTS.txt",             {obsconditions: DARK,             filename: 'SN_HOSTS',            flavor: 'SPARE',  downsample: 1}]
    - [GAL_CLUS_BCG,           29, "See $SCND_DIR/sv3/docs/GAL_CLUS_BCG.txt",         {obsconditions: DARK,             filename: 'GAL_CLUS_BCG',        flavor: 'SPARE',  downsample: 1}]
    - [GAL_CLUS_2ND,           30, "See $SCND_DIR/sv3/docs/GAL_CLUS_2ND.txt",         {obsconditions: DARK,             filename: 'GAL_CLUS_2ND',        flavor: 'SPARE',  downsample: 1}]
    - [GAL_CLUS_SAT,           31, "See $SCND_DIR/sv3/docs/GAL_CLUS_SAT.txt",         {obsconditions: DARK,             filename: 'GAL_CLUS_SAT',        flavor: 'SPARE',  downsample: 1}]
    - [STRONG_LENS,            34, "See $SCND_DIR/sv3/docs/STRONG_LENS.txt",          {obsconditions: DARK,             filename: 'STRONG_LENS',         flavor: 'SPARE',  downsample: 1}]
    - [WISE_VAR_QSO,           35, "See $SCND_DIR/sv3/docs/WISE_VAR_QSO.txt",         {obsconditions: DARK,             filename: 'WISE_VAR_QSO',        flavor: 'QSO',    downsample: 1}]
    - [Z5_QSO,                 36, "See $SCND_DIR/sv3/docs/Z5_QSO.txt",               {obsconditions: DARK,             filename: 'Z5_QSO',              flavor: 'QSO',    downsample: 1}]
    - [MWS_MAIN_CLUSTER_SV,    38, "See $SCND_DIR/sv3/docs/MWS_MAIN_CLUSTER_SV.txt",  {obsconditions: DARK|GRAY|BRIGHT, filename: 'MWS_MAIN_CLUSTER_SV', flavor: 'SPARE',  downsample: 1}]
    - [BRIGHT_HPM,             40, "See $SCND_DIR/sv3/docs/BRIGHT_HPM.txt",           {obsconditions: BRIGHT,           filename: 'BRIGHT_HPM',          flavor: 'SPARE',  downsample: 1}]
    - [WD_BINARIES_BRIGHT,     41, "See $SCND_DIR/sv3/docs/WD_BINARIES_BRIGHT.txt",   {obsconditions: BRIGHT,           filename: 'WD_BINARIES_BRIGHT',  flavor: 'SPARE',  downsample: 1}]
    - [WD_BINARIES_DARK,       42, "See $SCND_DIR/sv3/docs/WD_BINARIES_DARK.txt",     {obsconditions: DARK,             filename: 'WD_BINARIES_DARK',    flavor: 'SPARE',  downsample: 1}]
    - [PV_BRIGHT_HIGH,         43, "See $SCND_DIR/sv3/docs/PV_BRIGHT_HIGH.ipynb",     {obsconditions: BRIGHT,           filename: 'PV_BRIGHT_HIGH',      flavor: 'SPARE',  downsample: 1}]
    - [PV_BRIGHT_MEDIUM,       44, "See $SCND_DIR/sv3/docs/PV_BRIGHT_MEDIUM.ipynb",   {obsconditions: BRIGHT,           filename: 'PV_BRIGHT_MEDIUM',    flavor: 'SPARE',  downsample: 1}]
    - [PV_BRIGHT_LOW,          45, "See $SCND_DIR/sv3/docs/PV_BRIGHT_LOW.ipynb",      {obsconditions: BRIGHT,           filename: 'PV_BRIGHT_LOW',       flavor: 'SPARE',  downsample: 1}]
    - [PV_DARK_HIGH,           46, "See $SCND_DIR/sv3/docs/PV_DARK_HIGH.ipynb",       {obsconditions: DARK,             filename: 'PV_DARK_HIGH',        flavor: 'SPARE',  downsample: 1}]
    - [PV_DARK_MEDIUM,         47, "See $SCND_DIR/sv3/docs/PV_DARK_MEDIUM.ipynb",     {obsconditions: DARK,             filename: 'PV_DARK_MEDIUM',      flavor: 'SPARE',  downsample: 1}]
    - [PV_DARK_LOW,            48, "See $SCND_DIR/sv3/docs/PV_DARK_LOW.ipynb",        {obsconditions: DARK,             filename: 'PV_DARK_LOW',         flavor: 'SPARE',  downsample: 1}]

# ADM reserve 59-62 in scnd_mask for Targets of Opportunity in both SV and the Main Survey.
    - [BRIGHT_TOO_LOP,    59, "Targets of Opportunity from rolling ledger",   {obsconditions: BRIGHT|DARK, flavor: 'TOO'}]
    - [BRIGHT_TOO_HIP,    60, "Targets of Opportunity from rolling ledger",   {obsconditions: BRIGHT|DARK, flavor: 'TOO'}]
    - [DARK_TOO_LOP,      61, "Targets of Opportunity from rolling ledger",   {obsconditions: DARK,        flavor: 'TOO'}]
    - [DARK_TOO_HIP,      62, "Targets of Opportunity from rolling ledger",   {obsconditions: DARK,        flavor: 'TOO'}]

#- Observation State
#- if a target passes more than one target bit, it is possible that one bit
#- will consider the observations "DONE" while another bit will want "MORE".
#- DONOTOBSERVE trumps MORE which trumps DONE
# ADM The MORE_MIDZQSO priority is driven by secondary programs from Gontcho a Gontcho (1.4 < z < 2.1)
# ADM and Weiner et al. (0.7 < z < 2.1) to reobserve confirmed quasars where possible. The priority
# ADM of 100 should only be higher than DONE (and secondary filler) targets.
sv3_obsmask:
    - [UNOBS,          0, "unobserved"]
    - [OBS,            1, "observed but no spectro pipeline answer yet"]
    - [DONE,           2, "enough observations already obtained"]
    - [MORE_ZWARN,     3, "ambiguous redshift; need more observations"]
    - [MORE_ZGOOD,     4, "redshift known; need more observations"]
    - [MORE_MIDZQSO,   8, "z > 0.7 QSO; more observations at very low priority"]
    - [DONOTOBSERVE,  16, "Do not observe this target (possibly temporarily)"]

#- Priorities for each target bit
#- Numerically larger priorities are higher priority to be observed first.
#- NOTE: these aren't a bitmask, they are a mapping from bit -> priority
#- SAME_AS_XXX means to use the priorities for bitname XXX
#- -1 means the concept of priority doesn't really apply to this target class
#- Every target bit must define priority for "UNOBS"
#- Default priority for "MORE_ZGOOD" and "MORE_ZWARN" is same as "UNOBS"
#- Other states are default 1 unless specified here
#- -1 means that the concept of priority doesn't apply to this bit
priorities:
    #- Dark Survey: priorities 3000 - 3999
    sv3_desi_mask:
# ADM safest to set MORE_ZGOOD for ELGs/LRGs to DONE PROVIDED they have NUMOBS=1 as
# ADM they can match QSO targets that require multiple observations and trump those
# ADM QSOs with a higher priority. There is a unit test to check NUMOBS=1 for ELGs/LRGs.
        ELG: {UNOBS: 3000, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        LRG: {UNOBS: 3200, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
# ADM The MORE_MIDZQSO priority is driven by secondary programs from Gontcho a Gontcho (1.4 < z < 2.1)
# ADM and Weiner et al. (0.7 < z < 2.1) to reobserve confirmed quasars where possible. The priority
# ADM of 100 should only be higher than DONE (and secondary filler) targets.
        QSO: {UNOBS: 3400, MORE_ZGOOD: 3350, MORE_ZWARN: 3300, MORE_MIDZQSO: 100, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        ELG_LOP: {UNOBS: 3000, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        ELG_HIP: {UNOBS: 3100, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        # ADM don't prioritize a N/S target if it doesn't have other bits set
        LRG_NORTH: {UNOBS: 0, DONE: 0, OBS: 0, DONOTOBSERVE: 0}
        QSO_HIZ: SAME_AS_LRG_NORTH
        ELG_NORTH: SAME_AS_LRG_NORTH
        QSO_NORTH: SAME_AS_LRG_NORTH
        ELG_LOP_NORTH: SAME_AS_LRG_NORTH
        ELG_HIP_NORTH: SAME_AS_LRG_NORTH
        LRG_SOUTH: SAME_AS_LRG_NORTH
        ELG_SOUTH: SAME_AS_LRG_NORTH
        QSO_SOUTH: SAME_AS_LRG_NORTH
        ELG_LOP_SOUTH: SAME_AS_LRG_NORTH
        ELG_HIP_SOUTH: SAME_AS_LRG_NORTH
        BAD_SKY: {UNOBS: 0, OBS: 0, DONE: 0, MORE_ZWARN: 0, MORE_ZGOOD: 0}
        #- Standards and sky are treated specially; priorities don't apply
        STD_FAINT:  -1
        STD_WD:     -1
        SKY:        -1
        SUPP_SKY:   -1
        STD_BRIGHT: -1
        # STD_FAINT_BEST: -1
        # STD_BRIGHT_BEST: -1
        NO_TARGET:  -1
        #- placeholders to show we haven't forgotten these bits, but the
        #- exact bits in the other sections define the priorities
        BRIGHT_OBJECT: -1
        IN_BRIGHT_OBJECT: -1
        NEAR_BRIGHT_OBJECT: -1
        BGS_ANY: -1
        MWS_ANY: -1
        SCND_ANY: -1

    #- Bright Galaxy Survey: priorities 2000-2997
    # ADM reserve 2998 for MWS_WD (ensuring a priority below Dark Survey targets, just in case)
    #- reobserving successes has lower priority than MWS
    sv3_bgs_mask:
        BGS_FAINT: {UNOBS: 2000, MORE_ZWARN: 2, MORE_ZGOOD: 1000, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        BGS_BRIGHT: {UNOBS: 2100, MORE_ZWARN: 2, MORE_ZGOOD: 1000, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        BGS_WISE: {UNOBS: 2000, MORE_ZWARN: 2, MORE_ZGOOD: 1000, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        BGS_FAINT_HIP: {UNOBS: 2100, MORE_ZWARN: 2, MORE_ZGOOD: 1000, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        # ADM don't prioritize a N/S target if it doesn't have other bits set
        BGS_FAINT_SOUTH: {UNOBS: 0, MORE_ZWARN: 0, MORE_ZGOOD: 0, DONE: 0, OBS: 0, DONOTOBSERVE: 0}
        BGS_FAINT_NORTH: SAME_AS_BGS_FAINT_SOUTH
        BGS_BRIGHT_SOUTH: SAME_AS_BGS_FAINT_SOUTH
        BGS_BRIGHT_NORTH: SAME_AS_BGS_FAINT_SOUTH
        BGS_WISE_SOUTH: SAME_AS_BGS_FAINT_SOUTH
        BGS_WISE_NORTH: SAME_AS_BGS_FAINT_SOUTH

    #- Milky Way Survey: priorities 1000-1999
    # ADM WDs should be prioritized above BGS at 2998
    sv3_mws_mask: 
        MWS_BROAD:                    {UNOBS: 1400, MORE_ZWARN: 2, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        MWS_WD:                       {UNOBS: 2998, MORE_ZWARN: 2, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        MWS_NEARBY:                   {UNOBS: 1600, MORE_ZWARN: 2, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        MWS_BHB:                      {UNOBS: 1550, MORE_ZWARN: 2, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}

        # ADM don't prioritize a N/S target if it doesn't have other bits set
        MWS_BROAD_NORTH:              {UNOBS: 0, DONE: 0, OBS: 0, DONOTOBSERVE: 0}
        MWS_BROAD_SOUTH:              SAME_AS_MWS_BROAD_NORTH
        MWS_MAIN_BLUE:                {UNOBS: 1500, MORE_ZWARN: 2, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        MWS_MAIN_BLUE_NORTH:          SAME_AS_MWS_BROAD_NORTH
        MWS_MAIN_BLUE_SOUTH:          SAME_AS_MWS_BROAD_NORTH
        MWS_MAIN_RED:                 SAME_AS_MWS_MAIN_BLUE
        MWS_MAIN_RED_NORTH:           SAME_AS_MWS_BROAD_NORTH
        MWS_MAIN_RED_SOUTH:           SAME_AS_MWS_BROAD_NORTH
        BACKUP_BRIGHT:                {UNOBS: 9, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        BACKUP_FAINT:                 {UNOBS: 8, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        BACKUP_VERY_FAINT:            {UNOBS: 7, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        # ADM Standards are special; priorities don't apply.
        GAIA_STD_FAINT:  -1
        GAIA_STD_WD:  -1
        GAIA_STD_BRIGHT:  -1

    # ADM secondary target priorities.
    sv3_scnd_mask:
        VETO:                   {UNOBS:  0, DONE: 0, OBS: 0, DONOTOBSERVE: 0}
        UDG:                    {UNOBS: 1900, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        FIRST_MALS:             {UNOBS: 1025, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        QSO_RED:                {UNOBS: 3400, MORE_ZGOOD: 3350, MORE_ZWARN: 3300, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
#       MWS_DDOGIANTS:          {UNOBS: 1450, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        MWS_CLUS_GAL_DEEP:      {UNOBS: 1450, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        LOW_MASS_AGN:           {UNOBS: 1025, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        FAINT_HPM:              SAME_AS_LOW_MASS_AGN
        LOW_Z_TIER1:            {UNOBS: 80, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        LOW_Z_TIER2:            {UNOBS: 70, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        LOW_Z_TIER3:            {UNOBS: 60, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        BHB:                    {UNOBS: 1950, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        SPCV:                   SAME_AS_LOW_MASS_AGN
        DC3R2_GAMA:             {UNOBS: 1010, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PSF_OUT_BRIGHT:         {UNOBS: 90, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PSF_OUT_DARK:           SAME_AS_PSF_OUT_BRIGHT
        HPM_SOUM:               SAME_AS_LOW_MASS_AGN
        SN_HOSTS:               SAME_AS_BHB
        GAL_CLUS_BCG:           {UNOBS: 1025, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        GAL_CLUS_2ND:           {UNOBS: 1020, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        GAL_CLUS_SAT:           {UNOBS: 200,  DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        STRONG_LENS:            {UNOBS: 4000, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        WISE_VAR_QSO:           SAME_AS_QSO_RED
        Z5_QSO:                 SAME_AS_QSO_RED
        MWS_MAIN_CLUSTER_SV:    {UNOBS: 1450, DONE:  400, OBS: 1, DONOTOBSERVE: 0}
        BRIGHT_HPM:             SAME_AS_LOW_MASS_AGN
        WD_BINARIES_BRIGHT:     {UNOBS: 1998, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        WD_BINARIES_DARK:       {UNOBS: 1998, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PV_BRIGHT_HIGH:         {UNOBS: 1700, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PV_BRIGHT_MEDIUM:       {UNOBS: 1010, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PV_BRIGHT_LOW:          {UNOBS: 1005, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PV_DARK_HIGH:           {UNOBS: 1700, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PV_DARK_MEDIUM:         {UNOBS: 1010, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PV_DARK_LOW:            {UNOBS: 1005, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        BRIGHT_TOO_LOP:         {UNOBS: 1000, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        BRIGHT_TOO_HIP:         {UNOBS: 9999, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        DARK_TOO_LOP:           SAME_AS_BRIGHT_TOO_LOP
        DARK_TOO_HIP:           SAME_AS_BRIGHT_TOO_HIP

# ADM INITIAL number of observations (NUMOBS_INIT) for each target bit
# ADM SAME_AS_XXX means to use the NUMOBS_INIT for bitname XXX
# ADM -1 means that the concept of NUMOBS_INIT doesn't apply to this bit
numobs:
    # ADM initial number of observations for targets in the main (dark time) survey
    sv3_desi_mask:
        ELG: 1
        LRG: 1
        QSO: 4
        ELG_LOP: 1
        ELG_HIP: 1
        # ADM don't observe a N/S target if it doesn't have other bits set
        LRG_NORTH: 0
        ELG_NORTH: 0
        QSO_NORTH: 0
        ELG_LOP_NORTH: 0
        ELG_HIP_NORTH: 0
        LRG_SOUTH: 0
        ELG_SOUTH: 0
        QSO_SOUTH: 0
        ELG_LOP_SOUTH: 0
        ELG_HIP_SOUTH: 0
        BAD_SKY: 0
        #- Standards and sky are treated specially; NUMOBS doesn't apply
        STD_FAINT:  -1
        STD_WD:     -1
        SKY:        -1
        SUPP_SKY:   -1
        STD_BRIGHT: -1
        # STD_FAINT_BEST: -1
        # STD_BRIGHT_BEST: -1
        NO_TARGET:  -1
        #- placeholders to show we haven't forgotten these bits, but the
        #- exact bits in the other sections define the number of observations
        QSO_HIZ: -1
        BRIGHT_OBJECT: -1
        IN_BRIGHT_OBJECT: -1
        NEAR_BRIGHT_OBJECT: -1
        BGS_ANY: -1
        MWS_ANY: -1
        SCND_ANY: -1

    # ADM initial number of observations for targets in the Bright Galaxy Survey
    sv3_bgs_mask:
        BGS_FAINT: 1
        BGS_BRIGHT: 1
        BGS_WISE: 1
        BGS_FAINT_HIP: 1
        # ADM don't observe a N/S target if it doesn't have other bits set
        BGS_FAINT_SOUTH: 0
        BGS_FAINT_NORTH: 0
        BGS_BRIGHT_SOUTH: 0
        BGS_BRIGHT_NORTH: 0
        BGS_WISE_SOUTH: 0
        BGS_WISE_NORTH: 0

    # ADM initial number of observations for targets in the Bright Galaxy Survey
    sv3_mws_mask:
        MWS_BROAD:                    1
        MWS_WD:                       1
        MWS_NEARBY:                   1
        MWS_BHB:                      1
        # ADM don't observe a N/S target if it doesn't have other bits set
        MWS_BROAD_NORTH:              0
        MWS_BROAD_SOUTH:              0
        MWS_MAIN_BLUE:                1
        MWS_MAIN_BLUE_NORTH:          0
        MWS_MAIN_BLUE_SOUTH:          0
        MWS_MAIN_RED:                 SAME_AS_MWS_MAIN_BLUE
        MWS_MAIN_RED_NORTH:           0
        MWS_MAIN_RED_SOUTH:           0
        BACKUP_BRIGHT:                1
        BACKUP_FAINT:                 SAME_AS_BACKUP_BRIGHT
        BACKUP_VERY_FAINT:            SAME_AS_BACKUP_BRIGHT
        # ADM Standards are special; numobs doesn't apply.
        GAIA_STD_FAINT:  -1
        GAIA_STD_WD:  -1
        GAIA_STD_BRIGHT:  -1

    # ADM initial number of observations for secondary targets
    sv3_scnd_mask:
        VETO:                     1
        UDG:                    100
        FIRST_MALS:             100
        QSO_RED:                100
#       MWS_DDOGIANTS:          100
        MWS_CLUS_GAL_DEEP:      100
        LOW_MASS_AGN:           100
        FAINT_HPM:              100
        LOW_Z_TIER1:            100
        LOW_Z_TIER2:            100
        LOW_Z_TIER3:            100
        BHB:                    100
        SPCV:                   100
        DC3R2_GAMA:             100
        PSF_OUT_BRIGHT:         100
        PSF_OUT_DARK:           100
        HPM_SOUM:               100
        SN_HOSTS:               100
        GAL_CLUS_BCG:           2
        GAL_CLUS_2ND:           1
        GAL_CLUS_SAT:           1
        STRONG_LENS:            100
        WISE_VAR_QSO:           100
        Z5_QSO:                 100
        MWS_MAIN_CLUSTER_SV:    100
        BRIGHT_HPM:             100
        WD_BINARIES_BRIGHT:     100
        WD_BINARIES_DARK:       100
        PV_BRIGHT_HIGH:         5
        PV_BRIGHT_MEDIUM:       1<commit_msg>set numbers of observations for secondary targets to something sensible<commit_after>#- sv3 primary survey targets bit mask: dark survey + calib +
sv3_desi_mask:
    - [LRG,         0, "LRG", {obsconditions: DARK}]
    - [ELG,         1, "ELG", {obsconditions: DARK}]
    - [QSO,         2, "QSO", {obsconditions: DARK}]

    #- ADM QSO sub-classes
    - [QSO_HIZ,     4, "QSO selected using high-redshift Random Forest (informational bit)", {obsconditions: DARK}]

    # ADM ELG sub-classes
    # ADM ELG_LOP was deprecated early in SV3. We just use "ELG" for the low-priority ELGs.
    - [ELG_LOP,     5, "ELG at lower priority",  {obsconditions: DARK}]
    - [ELG_HIP,     6, "ELG at higher priority", {obsconditions: DARK}]

    #- North vs. South selections
    - [LRG_NORTH,      8, "LRG cuts tuned for Bok/Mosaic data",               {obsconditions: DARK}]
    - [ELG_NORTH,      9, "ELG cuts tuned for Bok/Mosaic data",               {obsconditions: DARK}]
    - [QSO_NORTH,     10, "QSO cuts tuned for Bok/Mosaic data",               {obsconditions: DARK}]
    - [ELG_LOP_NORTH, 11, "ELG at lower priority tuned for Bok/Mosaic data",  {obsconditions: DARK}]
    - [ELG_HIP_NORTH, 12, "ELG at higher priority tuned for Bok/Mosaic data", {obsconditions: DARK}]

    - [LRG_SOUTH,     16, "LRG cuts tuned for DECam data",                    {obsconditions: DARK}]
    - [ELG_SOUTH,     17, "ELG cuts tuned for DECam data",                    {obsconditions: DARK}]
    - [QSO_SOUTH,     18, "QSO cuts tuned for DECam data",                    {obsconditions: DARK}]
    - [ELG_LOP_SOUTH, 19, "ELG at lower priority tuned for DECam data",       {obsconditions: DARK}]
    - [ELG_HIP_SOUTH, 20, "ELG at higher priority tuned for DECam data",      {obsconditions: DARK}]

    #- Calibration targets
    - [SKY,         32, "Blank sky locations",
        {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18}]
    - [STD_FAINT,   33, "Standard stars for dark/gray conditions", {obsconditions: DARK|GRAY}]
    - [STD_WD,      34, "White Dwarf stars", {obsconditions: DARK|GRAY|BRIGHT}]
    - [STD_BRIGHT,  35, "Standard stars for BRIGHT conditions",
        {obsconditions: BRIGHT}]
    - [BAD_SKY,      36, "Blank sky locations that are imperfect but still useable",
        {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18}]
    - [SUPP_SKY,      37, "SKY is based on Gaia-avoidance (SKY will be set, too)",
        {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18}]

    #- Reserving some bits that we may not use
    # - [STD_FAINT_BEST,   38, "High quality faint standard stars",  {obsconditions: DARK|GRAY}]
    # - [STD_BRIGHT_BEST,  39, "High quality bright standard stars", {obsconditions: BRIGHT}]

    #- Reserved convenience bits that can, e.g., be set downstream of desitarget
    - [NO_TARGET,   49, "No known target at this location",
        {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18}]

    #- Related to bright object masking
    - [BRIGHT_OBJECT,       50, "Known bright object to avoid", {obsconditions: APOCALYPSE}]
    - [IN_BRIGHT_OBJECT,    51, "Too near a bright object; DO NOT OBSERVE", {obsconditions: APOCALYPSE}]
    - [NEAR_BRIGHT_OBJECT,  52, "Near a bright object but ok to observe",
            {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18}]

    #- A bit for another survey is set
    - [BGS_ANY,             60, "Any BGS bit is set", {obsconditions: IGNORE}]
    - [MWS_ANY,             61, "Any MWS bit is set", {obsconditions: IGNORE}]
    - [SCND_ANY,            62, "Any secondary bit is set",
        {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18}]

#- Bright Galaxy Survey
sv3_bgs_mask:
    - [BGS_FAINT,           0, "BGS faint targets",                     {obsconditions: BRIGHT}]
    - [BGS_BRIGHT,          1, "BGS bright targets",                    {obsconditions: BRIGHT}]
    - [BGS_WISE,            2, "BGS wise targets (AGN-like)",           {obsconditions: BRIGHT}]
    - [BGS_FAINT_HIP,       3, "BGS faint targets at bright priorty",   {obsconditions: BRIGHT}]

    #- BGS North vs. South selections
    - [BGS_FAINT_NORTH,     8, "BGS faint cuts tuned for Bok/Mosaic",              {obsconditions: BRIGHT}]
    - [BGS_BRIGHT_NORTH,    9, "BGS bright cuts tuned for Bok/Mosaic",             {obsconditions: BRIGHT}]
    - [BGS_WISE_NORTH,      10, "BGS WISE cuts tuned for Bok/Mosaic",              {obsconditions: BRIGHT}]
    - [BGS_FAINT_SOUTH,     16, "BGS faint cuts tuned for DECam",                  {obsconditions: BRIGHT}]
    - [BGS_BRIGHT_SOUTH,    17, "BGS bright cuts tuned for DECam",                 {obsconditions: BRIGHT}]
    - [BGS_WISE_SOUTH,      18, "BGS WISE cuts tuned for DECam",                   {obsconditions: BRIGHT}]

#- Milky Way Survey
sv3_mws_mask:

    # First layer defines main samples -- these are expected to have distinct
    # input catalogues.

    #- Bits 0-3 (7 ids)
    - [MWS_BROAD,           0, "Milky Way Survey magnitude limited bulk sample",         {obsconditions: BRIGHT}]
    - [MWS_WD,              1, "Milky Way Survey White Dwarf",                           {obsconditions: BRIGHT|GRAY|DARK}]
    - [MWS_NEARBY,          2, "Milky Way Survey volume-complete ~100pc sample",         {obsconditions: BRIGHT}]

    # Second layer flags additional subclasses that could apply to any
    # of the main classes. These sort targets in each input catalog into
    # distinct groups for the purpose of assigning priorities and observing
    # conditions.

    # e.g. MWS_MAIN & MWS_LOW_GAL_B & MWS_MAIN_FAINT & MWS_PLX & MWS_REOBS

    # => A main sample star at low galactic latitude, faint enough to be
    # considered filler but with parallax factored into the subpriority and
    # targeted for reobservation if possible.

    #- 4: MWS_BROAD north/south splits
    - [MWS_BROAD_NORTH,     4, "Milky Way Survey cuts tuned for Bok/Mosaic",               {obsconditions: BRIGHT}]
    - [MWS_BROAD_SOUTH,     5, "Milky Way Survey cuts tuned for DECam",                    {obsconditions: BRIGHT}]

    #- 6: MWS BHBs
    - [MWS_BHB,             6, "Milky Way Survey Blue Horizontal Branch stars", {obsconditions: BRIGHT|GRAY|DARK}]

    #- 8: Sub-classes of MWS_MAIN
    - [MWS_MAIN_BLUE,       8, "Milky Way Survey magnitude limited blue sample",              {obsconditions: BRIGHT}]
    - [MWS_MAIN_BLUE_NORTH, 9, "MWS magnitude limited blue sample tuned for Bok/Mosaic",      {obsconditions: BRIGHT}]
    - [MWS_MAIN_BLUE_SOUTH, 10, "MWS magnitude limited blue sample tuned for DECam",          {obsconditions: BRIGHT}]
    - [MWS_MAIN_RED,        11, "Milky Way Survey magnitude limited red sample",              {obsconditions: BRIGHT}]
    - [MWS_MAIN_RED_NORTH,  12, "MWS magnitude limited red sample tuned for Bok/Mosaic",      {obsconditions: BRIGHT}]
    - [MWS_MAIN_RED_SOUTH,  13, "MWS magnitude limited red sample tuned for DECam",           {obsconditions: BRIGHT}]

    # ADM Standard stars based only on Gaia.
    - [GAIA_STD_FAINT,      33, "Standard stars for dark/gray conditions",   {obsconditions: DARK|GRAY}]
    - [GAIA_STD_WD,         34, "White Dwarf stars",                         {obsconditions: DARK|GRAY|BRIGHT}]
    - [GAIA_STD_BRIGHT,     35, "Standard stars for BRIGHT conditions",      {obsconditions: BRIGHT}]

    # ADM back-up targets for poor conditions and as filler.
    - [BACKUP_BRIGHT,       60, "Bright backup Gaia targets",   {obsconditions: BACKUP|TWILIGHT12|TWILIGHT18}]
    - [BACKUP_FAINT,        61, "Fainter backup Gaia targets",  {obsconditions: BACKUP|TWILIGHT12|TWILIGHT18}]
    - [BACKUP_VERY_FAINT,   62, "Even fainter backup Gaia targets",  {obsconditions: BACKUP|TWILIGHT12|TWILIGHT18}]

#- ADM SV secondary survey targets bit mask.
#- ADM note that the 'filenames', here, should all be present in the
#- ADM directory that corresponds to the $SCND_DIR/sv3 environment
#- ADM variable, e.g. $SCND_DIR/sv3/veto.txt for VETO targets.
#- ADM downsample is the fraction of targets to read from the input file
#- ADM i.e. downsample: 0.13 means "read first 13% of targets from file."
sv3_scnd_mask:
    - [VETO,                    0, "Never observe, even if a primary target bit is set",
        {obsconditions: DARK|GRAY|BRIGHT|BACKUP|TWILIGHT12|TWILIGHT18, filename: 'veto', flavor: 'SPARE', downsample: 1}]
    - [UDG,                     1, "See $SCND_DIR/sv3/docs/UDG.txt",                  {obsconditions: DARK,             filename: 'UDG',                 flavor: 'SPARE',  downsample: 1}]
    - [FIRST_MALS,              2, "See $SCND_DIR/sv3/docs/FIRST_MALS.txt",           {obsconditions: DARK,             filename: 'FIRST_MALS',          flavor: 'SPARE',  downsample: 1}]
    - [QSO_RED,                 5, "See $SCND_DIR/sv3/docs/QSO_RED.ipynb",            {obsconditions: DARK,             filename: 'QSO_RED',             flavor: 'QSO',    downsample: 1}]
#   - [MWS_DDOGIANTS,           9, "See $SCND_DIR",                                   {obsconditions: BRIGHT,           filename: 'MWS_DDOGIANTS',       flavor: 'SPARE',  downsample: 1}]
    - [MWS_CLUS_GAL_DEEP,      10, "See $SCND_DIR/sv3/docs/MWS_CLUS_GAL_DEEP.txt",    {obsconditions: DARK,             filename: 'MWS_CLUS_GAL_DEEP',   flavor: 'SPARE',  downsample: 1}]
    - [LOW_MASS_AGN,           11, "See $SCND_DIR/sv3/docs/LOW_MASS_AGN.txt",         {obsconditions: DARK,             filename: 'LOW_MASS_AGN',        flavor: 'SPARE',  downsample: 1}]
    - [FAINT_HPM,              12, "See $SCND_DIR/sv3/docs/FAINT_HPM.txt",            {obsconditions: DARK,             filename: 'FAINT_HPM',           flavor: 'SPARE',  downsample: 1}]
    - [LOW_Z_TIER1,            15, "See $SCND_DIR/sv3/docs/LOW_Z_TIER1.ipynb",        {obsconditions: DARK,             filename: 'LOW_Z_TIER1',         flavor: 'SPARE',  downsample: 1}]
    - [LOW_Z_TIER2,            16, "See $SCND_DIR/sv3/docs/LOW_Z_TIER2.ipynb",        {obsconditions: DARK,             filename: 'LOW_Z_TIER2',         flavor: 'SPARE',  downsample: 1}]
    - [LOW_Z_TIER3,            17, "See $SCND_DIR/sv3/docs/LOW_Z_TIER3.ipynb",        {obsconditions: DARK,             filename: 'LOW_Z_TIER3',         flavor: 'SPARE',  downsample: 1}]
    - [BHB,                    18, "See $SCND_DIR/sv3/docs/BHB.txt",                  {obsconditions: DARK,             filename: 'BHB',                 flavor: 'SPARE',  downsample: 1}]
    - [SPCV,                   19, "See $SCND_DIR/sv3/docs/SPCV.txt",                 {obsconditions: DARK,             filename: 'SPCV',                flavor: 'SPARE',  downsample: 1}]
    - [DC3R2_GAMA,             20, "See $SCND_DIR/sv3/docs/DC3R2_GAMA.ipynb",         {obsconditions: DARK,             filename: 'DC3R2_GAMA',          flavor: 'SPARE',  downsample: 0.02}]
    - [PSF_OUT_BRIGHT,         25, "See $SCND_DIR/sv3/docs/PSF_OUT_BRIGHT.txt",       {obsconditions: BRIGHT,           filename: 'PSF_OUT_BRIGHT',      flavor: 'SPARE',  downsample: 1}]
    - [PSF_OUT_DARK,           26, "See $SCND_DIR/sv3/docs/PSF_OUT_DARK.txt",         {obsconditions: DARK,             filename: 'PSF_OUT_DARK',        flavor: 'SPARE',  downsample: 1}]
    - [HPM_SOUM,               27, "See $SCND_DIR/sv3/docs/HPM_SOUM.txt",             {obsconditions: DARK,             filename: 'HPM_SOUM',            flavor: 'SPARE',  downsample: 1}]
    - [SN_HOSTS,               28, "See $SCND_DIR/sv3/docs/SN_HOSTS.txt",             {obsconditions: DARK,             filename: 'SN_HOSTS',            flavor: 'SPARE',  downsample: 1}]
    - [GAL_CLUS_BCG,           29, "See $SCND_DIR/sv3/docs/GAL_CLUS_BCG.txt",         {obsconditions: DARK,             filename: 'GAL_CLUS_BCG',        flavor: 'SPARE',  downsample: 1}]
    - [GAL_CLUS_2ND,           30, "See $SCND_DIR/sv3/docs/GAL_CLUS_2ND.txt",         {obsconditions: DARK,             filename: 'GAL_CLUS_2ND',        flavor: 'SPARE',  downsample: 1}]
    - [GAL_CLUS_SAT,           31, "See $SCND_DIR/sv3/docs/GAL_CLUS_SAT.txt",         {obsconditions: DARK,             filename: 'GAL_CLUS_SAT',        flavor: 'SPARE',  downsample: 1}]
    - [STRONG_LENS,            34, "See $SCND_DIR/sv3/docs/STRONG_LENS.txt",          {obsconditions: DARK,             filename: 'STRONG_LENS',         flavor: 'SPARE',  downsample: 1}]
    - [WISE_VAR_QSO,           35, "See $SCND_DIR/sv3/docs/WISE_VAR_QSO.txt",         {obsconditions: DARK,             filename: 'WISE_VAR_QSO',        flavor: 'QSO',    downsample: 1}]
    - [Z5_QSO,                 36, "See $SCND_DIR/sv3/docs/Z5_QSO.txt",               {obsconditions: DARK,             filename: 'Z5_QSO',              flavor: 'QSO',    downsample: 1}]
    - [MWS_MAIN_CLUSTER_SV,    38, "See $SCND_DIR/sv3/docs/MWS_MAIN_CLUSTER_SV.txt",  {obsconditions: DARK|GRAY|BRIGHT, filename: 'MWS_MAIN_CLUSTER_SV', flavor: 'SPARE',  downsample: 1}]
    - [BRIGHT_HPM,             40, "See $SCND_DIR/sv3/docs/BRIGHT_HPM.txt",           {obsconditions: BRIGHT,           filename: 'BRIGHT_HPM',          flavor: 'SPARE',  downsample: 1}]
    - [WD_BINARIES_BRIGHT,     41, "See $SCND_DIR/sv3/docs/WD_BINARIES_BRIGHT.txt",   {obsconditions: BRIGHT,           filename: 'WD_BINARIES_BRIGHT',  flavor: 'SPARE',  downsample: 1}]
    - [WD_BINARIES_DARK,       42, "See $SCND_DIR/sv3/docs/WD_BINARIES_DARK.txt",     {obsconditions: DARK,             filename: 'WD_BINARIES_DARK',    flavor: 'SPARE',  downsample: 1}]
    - [PV_BRIGHT_HIGH,         43, "See $SCND_DIR/sv3/docs/PV_BRIGHT_HIGH.ipynb",     {obsconditions: BRIGHT,           filename: 'PV_BRIGHT_HIGH',      flavor: 'SPARE',  downsample: 1}]
    - [PV_BRIGHT_MEDIUM,       44, "See $SCND_DIR/sv3/docs/PV_BRIGHT_MEDIUM.ipynb",   {obsconditions: BRIGHT,           filename: 'PV_BRIGHT_MEDIUM',    flavor: 'SPARE',  downsample: 1}]
    - [PV_BRIGHT_LOW,          45, "See $SCND_DIR/sv3/docs/PV_BRIGHT_LOW.ipynb",      {obsconditions: BRIGHT,           filename: 'PV_BRIGHT_LOW',       flavor: 'SPARE',  downsample: 1}]
    - [PV_DARK_HIGH,           46, "See $SCND_DIR/sv3/docs/PV_DARK_HIGH.ipynb",       {obsconditions: DARK,             filename: 'PV_DARK_HIGH',        flavor: 'SPARE',  downsample: 1}]
    - [PV_DARK_MEDIUM,         47, "See $SCND_DIR/sv3/docs/PV_DARK_MEDIUM.ipynb",     {obsconditions: DARK,             filename: 'PV_DARK_MEDIUM',      flavor: 'SPARE',  downsample: 1}]
    - [PV_DARK_LOW,            48, "See $SCND_DIR/sv3/docs/PV_DARK_LOW.ipynb",        {obsconditions: DARK,             filename: 'PV_DARK_LOW',         flavor: 'SPARE',  downsample: 1}]

# ADM reserve 59-62 in scnd_mask for Targets of Opportunity in both SV and the Main Survey.
    - [BRIGHT_TOO_LOP,    59, "Targets of Opportunity from rolling ledger",   {obsconditions: BRIGHT|DARK, flavor: 'TOO'}]
    - [BRIGHT_TOO_HIP,    60, "Targets of Opportunity from rolling ledger",   {obsconditions: BRIGHT|DARK, flavor: 'TOO'}]
    - [DARK_TOO_LOP,      61, "Targets of Opportunity from rolling ledger",   {obsconditions: DARK,        flavor: 'TOO'}]
    - [DARK_TOO_HIP,      62, "Targets of Opportunity from rolling ledger",   {obsconditions: DARK,        flavor: 'TOO'}]

#- Observation State
#- if a target passes more than one target bit, it is possible that one bit
#- will consider the observations "DONE" while another bit will want "MORE".
#- DONOTOBSERVE trumps MORE which trumps DONE
# ADM The MORE_MIDZQSO priority is driven by secondary programs from Gontcho a Gontcho (1.4 < z < 2.1)
# ADM and Weiner et al. (0.7 < z < 2.1) to reobserve confirmed quasars where possible. The priority
# ADM of 100 should only be higher than DONE (and secondary filler) targets.
sv3_obsmask:
    - [UNOBS,          0, "unobserved"]
    - [OBS,            1, "observed but no spectro pipeline answer yet"]
    - [DONE,           2, "enough observations already obtained"]
    - [MORE_ZWARN,     3, "ambiguous redshift; need more observations"]
    - [MORE_ZGOOD,     4, "redshift known; need more observations"]
    - [MORE_MIDZQSO,   8, "z > 0.7 QSO; more observations at very low priority"]
    - [DONOTOBSERVE,  16, "Do not observe this target (possibly temporarily)"]

#- Priorities for each target bit
#- Numerically larger priorities are higher priority to be observed first.
#- NOTE: these aren't a bitmask, they are a mapping from bit -> priority
#- SAME_AS_XXX means to use the priorities for bitname XXX
#- -1 means the concept of priority doesn't really apply to this target class
#- Every target bit must define priority for "UNOBS"
#- Default priority for "MORE_ZGOOD" and "MORE_ZWARN" is same as "UNOBS"
#- Other states are default 1 unless specified here
#- -1 means that the concept of priority doesn't apply to this bit
priorities:
    #- Dark Survey: priorities 3000 - 3999
    sv3_desi_mask:
# ADM safest to set MORE_ZGOOD for ELGs/LRGs to DONE PROVIDED they have NUMOBS=1 as
# ADM they can match QSO targets that require multiple observations and trump those
# ADM QSOs with a higher priority. There is a unit test to check NUMOBS=1 for ELGs/LRGs.
        ELG: {UNOBS: 3000, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        LRG: {UNOBS: 3200, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
# ADM The MORE_MIDZQSO priority is driven by secondary programs from Gontcho a Gontcho (1.4 < z < 2.1)
# ADM and Weiner et al. (0.7 < z < 2.1) to reobserve confirmed quasars where possible. The priority
# ADM of 100 should only be higher than DONE (and secondary filler) targets.
        QSO: {UNOBS: 3400, MORE_ZGOOD: 3350, MORE_ZWARN: 3300, MORE_MIDZQSO: 100, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        ELG_LOP: {UNOBS: 3000, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        ELG_HIP: {UNOBS: 3100, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        # ADM don't prioritize a N/S target if it doesn't have other bits set
        LRG_NORTH: {UNOBS: 0, DONE: 0, OBS: 0, DONOTOBSERVE: 0}
        QSO_HIZ: SAME_AS_LRG_NORTH
        ELG_NORTH: SAME_AS_LRG_NORTH
        QSO_NORTH: SAME_AS_LRG_NORTH
        ELG_LOP_NORTH: SAME_AS_LRG_NORTH
        ELG_HIP_NORTH: SAME_AS_LRG_NORTH
        LRG_SOUTH: SAME_AS_LRG_NORTH
        ELG_SOUTH: SAME_AS_LRG_NORTH
        QSO_SOUTH: SAME_AS_LRG_NORTH
        ELG_LOP_SOUTH: SAME_AS_LRG_NORTH
        ELG_HIP_SOUTH: SAME_AS_LRG_NORTH
        BAD_SKY: {UNOBS: 0, OBS: 0, DONE: 0, MORE_ZWARN: 0, MORE_ZGOOD: 0}
        #- Standards and sky are treated specially; priorities don't apply
        STD_FAINT:  -1
        STD_WD:     -1
        SKY:        -1
        SUPP_SKY:   -1
        STD_BRIGHT: -1
        # STD_FAINT_BEST: -1
        # STD_BRIGHT_BEST: -1
        NO_TARGET:  -1
        #- placeholders to show we haven't forgotten these bits, but the
        #- exact bits in the other sections define the priorities
        BRIGHT_OBJECT: -1
        IN_BRIGHT_OBJECT: -1
        NEAR_BRIGHT_OBJECT: -1
        BGS_ANY: -1
        MWS_ANY: -1
        SCND_ANY: -1

    #- Bright Galaxy Survey: priorities 2000-2997
    # ADM reserve 2998 for MWS_WD (ensuring a priority below Dark Survey targets, just in case)
    #- reobserving successes has lower priority than MWS
    sv3_bgs_mask:
        BGS_FAINT: {UNOBS: 2000, MORE_ZWARN: 2, MORE_ZGOOD: 1000, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        BGS_BRIGHT: {UNOBS: 2100, MORE_ZWARN: 2, MORE_ZGOOD: 1000, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        BGS_WISE: {UNOBS: 2000, MORE_ZWARN: 2, MORE_ZGOOD: 1000, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        BGS_FAINT_HIP: {UNOBS: 2100, MORE_ZWARN: 2, MORE_ZGOOD: 1000, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        # ADM don't prioritize a N/S target if it doesn't have other bits set
        BGS_FAINT_SOUTH: {UNOBS: 0, MORE_ZWARN: 0, MORE_ZGOOD: 0, DONE: 0, OBS: 0, DONOTOBSERVE: 0}
        BGS_FAINT_NORTH: SAME_AS_BGS_FAINT_SOUTH
        BGS_BRIGHT_SOUTH: SAME_AS_BGS_FAINT_SOUTH
        BGS_BRIGHT_NORTH: SAME_AS_BGS_FAINT_SOUTH
        BGS_WISE_SOUTH: SAME_AS_BGS_FAINT_SOUTH
        BGS_WISE_NORTH: SAME_AS_BGS_FAINT_SOUTH

    #- Milky Way Survey: priorities 1000-1999
    # ADM WDs should be prioritized above BGS at 2998
    sv3_mws_mask: 
        MWS_BROAD:                    {UNOBS: 1400, MORE_ZWARN: 2, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        MWS_WD:                       {UNOBS: 2998, MORE_ZWARN: 2, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        MWS_NEARBY:                   {UNOBS: 1600, MORE_ZWARN: 2, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        MWS_BHB:                      {UNOBS: 1550, MORE_ZWARN: 2, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}

        # ADM don't prioritize a N/S target if it doesn't have other bits set
        MWS_BROAD_NORTH:              {UNOBS: 0, DONE: 0, OBS: 0, DONOTOBSERVE: 0}
        MWS_BROAD_SOUTH:              SAME_AS_MWS_BROAD_NORTH
        MWS_MAIN_BLUE:                {UNOBS: 1500, MORE_ZWARN: 2, MORE_ZGOOD: 2, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        MWS_MAIN_BLUE_NORTH:          SAME_AS_MWS_BROAD_NORTH
        MWS_MAIN_BLUE_SOUTH:          SAME_AS_MWS_BROAD_NORTH
        MWS_MAIN_RED:                 SAME_AS_MWS_MAIN_BLUE
        MWS_MAIN_RED_NORTH:           SAME_AS_MWS_BROAD_NORTH
        MWS_MAIN_RED_SOUTH:           SAME_AS_MWS_BROAD_NORTH
        BACKUP_BRIGHT:                {UNOBS: 9, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        BACKUP_FAINT:                 {UNOBS: 8, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        BACKUP_VERY_FAINT:            {UNOBS: 7, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
        # ADM Standards are special; priorities don't apply.
        GAIA_STD_FAINT:  -1
        GAIA_STD_WD:  -1
        GAIA_STD_BRIGHT:  -1

    # ADM secondary target priorities.
    sv3_scnd_mask:
        VETO:                   {UNOBS:  0, DONE: 0, OBS: 0, DONOTOBSERVE: 0}
        UDG:                    {UNOBS: 1900, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        FIRST_MALS:             {UNOBS: 1025, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        QSO_RED:                {UNOBS: 3400, MORE_ZGOOD: 3350, MORE_ZWARN: 3300, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
#       MWS_DDOGIANTS:          {UNOBS: 1450, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        MWS_CLUS_GAL_DEEP:      {UNOBS: 1450, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        LOW_MASS_AGN:           {UNOBS: 1025, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        FAINT_HPM:              SAME_AS_LOW_MASS_AGN
        LOW_Z_TIER1:            {UNOBS: 80, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        LOW_Z_TIER2:            {UNOBS: 70, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        LOW_Z_TIER3:            {UNOBS: 60, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        BHB:                    {UNOBS: 1950, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        SPCV:                   SAME_AS_LOW_MASS_AGN
        DC3R2_GAMA:             {UNOBS: 1010, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PSF_OUT_BRIGHT:         {UNOBS: 90, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PSF_OUT_DARK:           SAME_AS_PSF_OUT_BRIGHT
        HPM_SOUM:               SAME_AS_LOW_MASS_AGN
        SN_HOSTS:               SAME_AS_BHB
        GAL_CLUS_BCG:           {UNOBS: 1025, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        GAL_CLUS_2ND:           {UNOBS: 1020, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        GAL_CLUS_SAT:           {UNOBS: 200,  DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        STRONG_LENS:            {UNOBS: 4000, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        WISE_VAR_QSO:           SAME_AS_QSO_RED
        Z5_QSO:                 SAME_AS_QSO_RED
        MWS_MAIN_CLUSTER_SV:    {UNOBS: 1450, DONE:  400, OBS: 1, DONOTOBSERVE: 0}
        BRIGHT_HPM:             SAME_AS_LOW_MASS_AGN
        WD_BINARIES_BRIGHT:     {UNOBS: 1998, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        WD_BINARIES_DARK:       {UNOBS: 1998, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PV_BRIGHT_HIGH:         {UNOBS: 1700, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PV_BRIGHT_MEDIUM:       {UNOBS: 1010, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PV_BRIGHT_LOW:          {UNOBS: 1005, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PV_DARK_HIGH:           {UNOBS: 1700, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PV_DARK_MEDIUM:         {UNOBS: 1010, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        PV_DARK_LOW:            {UNOBS: 1005, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        BRIGHT_TOO_LOP:         {UNOBS: 1000, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        BRIGHT_TOO_HIP:         {UNOBS: 9999, DONE:    2, OBS: 1, DONOTOBSERVE: 0}
        DARK_TOO_LOP:           SAME_AS_BRIGHT_TOO_LOP
        DARK_TOO_HIP:           SAME_AS_BRIGHT_TOO_HIP

# ADM INITIAL number of observations (NUMOBS_INIT) for each target bit
# ADM SAME_AS_XXX means to use the NUMOBS_INIT for bitname XXX
# ADM -1 means that the concept of NUMOBS_INIT doesn't apply to this bit
numobs:
    # ADM initial number of observations for targets in the main (dark time) survey
    sv3_desi_mask:
        ELG: 1
        LRG: 1
        QSO: 4
        ELG_LOP: 1
        ELG_HIP: 1
        # ADM don't observe a N/S target if it doesn't have other bits set
        LRG_NORTH: 0
        ELG_NORTH: 0
        QSO_NORTH: 0
        ELG_LOP_NORTH: 0
        ELG_HIP_NORTH: 0
        LRG_SOUTH: 0
        ELG_SOUTH: 0
        QSO_SOUTH: 0
        ELG_LOP_SOUTH: 0
        ELG_HIP_SOUTH: 0
        BAD_SKY: 0
        #- Standards and sky are treated specially; NUMOBS doesn't apply
        STD_FAINT:  -1
        STD_WD:     -1
        SKY:        -1
        SUPP_SKY:   -1
        STD_BRIGHT: -1
        # STD_FAINT_BEST: -1
        # STD_BRIGHT_BEST: -1
        NO_TARGET:  -1
        #- placeholders to show we haven't forgotten these bits, but the
        #- exact bits in the other sections define the number of observations
        QSO_HIZ: -1
        BRIGHT_OBJECT: -1
        IN_BRIGHT_OBJECT: -1
        NEAR_BRIGHT_OBJECT: -1
        BGS_ANY: -1
        MWS_ANY: -1
        SCND_ANY: -1

    # ADM initial number of observations for targets in the Bright Galaxy Survey
    sv3_bgs_mask:
        BGS_FAINT: 1
        BGS_BRIGHT: 1
        BGS_WISE: 1
        BGS_FAINT_HIP: 1
        # ADM don't observe a N/S target if it doesn't have other bits set
        BGS_FAINT_SOUTH: 0
        BGS_FAINT_NORTH: 0
        BGS_BRIGHT_SOUTH: 0
        BGS_BRIGHT_NORTH: 0
        BGS_WISE_SOUTH: 0
        BGS_WISE_NORTH: 0

    # ADM initial number of observations for targets in the Bright Galaxy Survey
    sv3_mws_mask:
        MWS_BROAD:                    1
        MWS_WD:                       1
        MWS_NEARBY:                   1
        MWS_BHB:                      1
        # ADM don't observe a N/S target if it doesn't have other bits set
        MWS_BROAD_NORTH:              0
        MWS_BROAD_SOUTH:              0
        MWS_MAIN_BLUE:                1
        MWS_MAIN_BLUE_NORTH:          0
        MWS_MAIN_BLUE_SOUTH:          0
        MWS_MAIN_RED:                 SAME_AS_MWS_MAIN_BLUE
        MWS_MAIN_RED_NORTH:           0
        MWS_MAIN_RED_SOUTH:           0
        BACKUP_BRIGHT:                1
        BACKUP_FAINT:                 SAME_AS_BACKUP_BRIGHT
        BACKUP_VERY_FAINT:            SAME_AS_BACKUP_BRIGHT
        # ADM Standards are special; numobs doesn't apply.
        GAIA_STD_FAINT:  -1
        GAIA_STD_WD:  -1
        GAIA_STD_BRIGHT:  -1

    # ADM initial number of observations for secondary targets
    sv3_scnd_mask:
        VETO:                   1
        UDG:                    1
        FIRST_MALS:             1
        QSO_RED:                4
#       MWS_DDOGIANTS:          1
        MWS_CLUS_GAL_DEEP:      1
        LOW_MASS_AGN:           1
        FAINT_HPM:              1
        LOW_Z_TIER1:            1
        LOW_Z_TIER2:            1
        LOW_Z_TIER3:            1
        BHB:                    1
        SPCV:                   1
        DC3R2_GAMA:             1
        PSF_OUT_BRIGHT:         1
        PSF_OUT_DARK:           1
        HPM_SOUM:               1
        SN_HOSTS:               1
        GAL_CLUS_BCG:           2
        GAL_CLUS_2ND:           1
        GAL_CLUS_SAT:           1
        STRONG_LENS:            1
        WISE_VAR_QSO:           1
        Z5_QSO:                 4
        MWS_MAIN_CLUSTER_SV:    1
        BRIGHT_HPM:             1
        WD_BINARIES_BRIGHT:     1
        WD_BINARIES_DARK:       1
        PV_BRIGHT_HIGH:         5
        PV_BRIGHT_MEDIUM:       1
{'fraction_non_alphanumeric': 0.09839776465178793, 'fraction_numerical': 0.03218618469918297, 'mean_word_length': 2.135925022182786, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1072786', 'n_tokens_mistral': 22534, 'n_tokens_neox': 20531, 'n_words': 5358}