Skip to content

Commit

Permalink
Merge pull request #2176 from desihub/fibermap-units
Browse files Browse the repository at this point in the history
[WIP] Add units to fibermap tables
  • Loading branch information
weaverba137 committed Feb 20, 2024
2 parents 0f17efc + a4e3314 commit 485f856
Show file tree
Hide file tree
Showing 17 changed files with 790 additions and 466 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fitsio-version: ['==1.1.6', '<2'] # fuji+guadalupe, latest
numpy-version: ['<1.23'] # to keep asscalar, used by astropy
env:
DESIUTIL_VERSION: 3.2.6
DESIUTIL_VERSION: 3.4.2
DESIMODEL_DATA: branches/test-0.18

steps:
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
fitsio-version: ['<2'] # latest
numpy-version: ['<1.23'] # to keep asscalar, used by astropy
env:
DESIUTIL_VERSION: 3.2.6
DESIUTIL_VERSION: 3.4.2
DESIMODEL_DATA: branches/test-0.18

steps:
Expand Down
6 changes: 4 additions & 2 deletions doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ desispec Change Log

Major API/functional changes:

* Dark missing from DESI_SPECTRO_DARK is now a fatal error unless
preproc with --fallback-on-dark-not-found (PR `#2162`_).
* Dark missing from ``DESI_SPECTRO_DARK`` is now a fatal error unless
preproc with ``--fallback-on-dark-not-found`` (PR `#2162`_).
* New CTE modeling on selected CCDs; requires matching DESI_SPECTRO_CALIB
update post 0.5.1 (PR `#2163`_).

Expand All @@ -18,13 +18,15 @@ Smaller items and new features:
* Add desi_link_calibnight script (PR `#2165`_).
* Fix redrock API change templates_dir vs. template_path (PR `#2168`_).
* Add read_spectra_parallel (PR `#2169`_).
* Propagate units and comments in ``FIBERMAP`` HDUs (PR `#2176`_).

.. _`#2160`: https://github.com/desihub/desispec/pull/2160
.. _`#2162`: https://github.com/desihub/desispec/pull/2162
.. _`#2163`: https://github.com/desihub/desispec/pull/2163
.. _`#2165`: https://github.com/desihub/desispec/pull/2165
.. _`#2168`: https://github.com/desihub/desispec/pull/2168
.. _`#2169`: https://github.com/desihub/desispec/pull/2169
.. _`#2176`: https://github.com/desihub/desispec/pull/2176

0.61.0 (2024-01-15)
-------------------
Expand Down
18 changes: 9 additions & 9 deletions doc/nb/FibermapCombinationTest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"## Replicate `assemble_fibermap` script\n",
"\n",
"```\n",
"assemble_fibermap -n NIGHT -e EXPID -o OUTFILE\n",
"desi_assemble_fibermap -n NIGHT -e EXPID -o OUTFILE\n",
"```"
]
},
Expand Down Expand Up @@ -86,7 +86,7 @@
"expid = '00101293'\n",
"outfile = os.path.join(os.environ['CSCRATCH'], f'fibermap-{expid}.fits')\n",
"\n",
"with patch('sys.argv', ['assemble_fibermap', '-n', night, '-e', expid, '-o', outfile]) as foo: \n",
"with patch('sys.argv', ['desi_assemble_fibermap', '-n', night, '-e', expid, '-o', outfile]) as foo:\n",
" parser = argparse.ArgumentParser(usage = \"{prog} [options]\")\n",
" parser.add_argument(\"-n\", \"--night\", type=int, required=True,\n",
" help=\"input night\")\n",
Expand Down Expand Up @@ -1570,7 +1570,7 @@
"else:\n",
" log.warning(\"Setting RELEASE to int16.\")\n",
" fibermap['RELEASE'] = fibermap['RELEASE'].astype(np.int16)\n",
" \n",
"\n",
"#- Some code incorrectly relies upon the fibermap being sorted by\n",
"#- fiber number, so accomodate that before returning the table\n",
"fibermap.sort('FIBER')\n"
Expand Down Expand Up @@ -2552,7 +2552,7 @@
}
],
"source": [
"sv2dark = (program == 'dark') & (exposures['SURVEY'] == 'sv2') & (exposures['NIGHT'] == 20210403) \n",
"sv2dark = (program == 'dark') & (exposures['SURVEY'] == 'sv2') & (exposures['NIGHT'] == 20210403)\n",
"exposures['NIGHT'][sv2dark], exposures['EXPID'][sv2dark]"
]
},
Expand All @@ -2579,7 +2579,7 @@
}
],
"source": [
"sv2bright = (program == 'bright') & (exposures['SURVEY'] == 'sv2') & (exposures['NIGHT'] == 20210324) \n",
"sv2bright = (program == 'bright') & (exposures['SURVEY'] == 'sv2') & (exposures['NIGHT'] == 20210324)\n",
"exposures['NIGHT'][sv2bright], exposures['EXPID'][sv2bright]"
]
},
Expand All @@ -2604,7 +2604,7 @@
}
],
"source": [
"sv3dark = (program == 'dark') & (exposures['SURVEY'] == 'sv3') & (exposures['NIGHT'] == 20210420) \n",
"sv3dark = (program == 'dark') & (exposures['SURVEY'] == 'sv3') & (exposures['NIGHT'] == 20210420)\n",
"exposures['NIGHT'][sv3dark], exposures['EXPID'][sv3dark]"
]
},
Expand All @@ -2631,7 +2631,7 @@
}
],
"source": [
"sv3bright = (program == 'bright') & (exposures['SURVEY'] == 'sv3') & (exposures['NIGHT'] == 20210420) \n",
"sv3bright = (program == 'bright') & (exposures['SURVEY'] == 'sv3') & (exposures['NIGHT'] == 20210420)\n",
"exposures['NIGHT'][sv3bright], exposures['EXPID'][sv3bright]"
]
},
Expand Down Expand Up @@ -2659,7 +2659,7 @@
}
],
"source": [
"maindark = (program == 'dark') & (exposures['SURVEY'] == 'main') & (exposures['NIGHT'] == 20210531) \n",
"maindark = (program == 'dark') & (exposures['SURVEY'] == 'main') & (exposures['NIGHT'] == 20210531)\n",
"exposures['NIGHT'][maindark], exposures['EXPID'][maindark]"
]
},
Expand All @@ -2683,7 +2683,7 @@
}
],
"source": [
"mainbright = (program == 'bright') & (exposures['SURVEY'] == 'main') & (exposures['NIGHT'] == 20210531) \n",
"mainbright = (program == 'bright') & (exposures['SURVEY'] == 'main') & (exposures['NIGHT'] == 20210531)\n",
"exposures['NIGHT'][mainbright], exposures['EXPID'][mainbright]"
]
},
Expand Down

0 comments on commit 485f856

Please sign in to comment.