Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into depth1_mapmaker
Browse files Browse the repository at this point in the history
  • Loading branch information
chervias committed Sep 23, 2024
2 parents 32a99f8 + 0f0c0c0 commit efe3cc0
Show file tree
Hide file tree
Showing 6 changed files with 896 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
'quaternionarray', 'yaml', 'toml', 'sqlite3','tqdm',
'skyfield', 'h5py', 'pyfftw', 'scipy',
'toast', 'pixell', 'scikit', 'skimage', 'numdifftools',
'traitlets', 'ephem', 'influxdb', 'megham', 'detmap'):
'traitlets', 'ephem', 'influxdb', 'megham', 'detmap',
'sodetlib'):
try:
foo = import_module(missing)
except ImportError:
Expand Down
26 changes: 26 additions & 0 deletions docs/site_pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,32 @@ Command line arguments
:func: get_parser
:prog: update_smurf_caldbs.py

update-det-cal
-----------------------
.. automodule:: sotodlib.site_pipeline.update_det_cal
:no-members:

CalInfo object
```````````````````

.. autoclass:: sotodlib.site_pipeline.update_det_cal.CalInfo
:no-members:

Configuration
``````````````

Configuration of the update_det_cal script is done by supplying a yaml file.

.. argparse::
:module: sotodlib.site_pipeline.update_det_cal
:func: get_parser
:prog: update_smurf_caldbs.py

The possible configuration parameters are defined by the DetCalCfg class:

.. autoclass:: sotodlib.site_pipeline.update_det_cal.DetCalCfg
:members:

Detector and Readout ID Mapping
-------------------------------

Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
setup_opts["extras_require"] = {
"site_pipeline": [
"influxdb",
"venn"
"venn",
"sodetlib @ git+https://github.com/simonsobs/sodetlib",
],
"tests": [
"socs",
Expand Down
12 changes: 12 additions & 0 deletions sotodlib/io/imprinter_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,18 @@ def autofix_failed_books(imprint:Imprinter, test_mode=False):
print(f"Book {book.bid} does not have readout ids, not binding")
if not test_mode:
utils.set_book_wont_bind(imprint, book)
elif 'NoScanFrames' in book.message:
print(f"Book {book.bid} does not have scan frames, not binding")
if not test_mode:
utils.set_book_wont_bind(imprint, book)
elif 'NoHWPData' in book.message:
print(
f"Book {book.bid} does not HWP data reading out, binding "
"anyway"
)
if not test_mode:
utils.set_book_rebind(imprint, book)
imprint.bind_book(book, require_hwp=False,)
else:
print(f"I cannot catagorize book {book.bid}")

Expand Down
17 changes: 14 additions & 3 deletions sotodlib/site_pipeline/make_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import datetime as dt
from typing import Optional
from sotodlib.io.imprinter import Imprinter
import sotodlib.io.imprinter_utils as utils


def main(config: str):
"""Make books based on imprinter db
Expand Down Expand Up @@ -32,15 +34,24 @@ def main(config: str):
print(f"Error binding book {book.bid}: {e}")
print(traceback.format_exc())

print("Retrying failed books")
print("Retrying failed books")
failed_books = imprinter.get_failed_books()
for book in failed_books:
if book in already_failed_books:
print(f"Book {book.bid} has already failed twice, not re-trying")
continue
print(f"Binding book {book.bid}")
try:
imprinter.bind_book(book)
if 'NoHWPData' in book.message:
print(
f"Book {book.bid} does not HWP data reading out, binding "
"anyway"
)
require_hwp = False
else:
require_hwp = True
try:
utils.set_book_rebind(imprinter, book)
imprinter.bind_book(book, require_hwp=require_hwp)
except Exception as e:
print(f"Error binding book {book.bid}: {e}")
print(traceback.format_exc())
Expand Down
Loading

0 comments on commit efe3cc0

Please sign in to comment.