24 from lsst.daf.butler
import Butler
25 from ..utils
import getInstrument
27 log = logging.getLogger(__name__)
31 """Add an instrument's curated calibrations to the data repository.
36 URI to the location to create the repo.
38 The name or the fully qualified class name of an instrument.
39 collection : `str` or `None`
40 The path to the collection that assocaites datasets with validity
42 Can be `None` in which case the collection name will be determined
45 Suffix to add to the RUN collections that datasets are inserted
46 directly into, and if ``collection`` is `None`, the automatic
47 calibration collection name as well.
52 Raised if the instrument can not be imported, instantiated, or obtained
55 Raised if the instrument is not a subclass of
56 `lsst.obs.base.Instrument`.
58 butler = Butler(repo, writeable=
True)
60 instr.writeCuratedCalibrations(butler, collection=collection,
61 suffixes=(suffix,)
if suffix
is not None else ())