Skip to content

Commit

Permalink
Put all gen3 formatters in a formatters subdir
Browse files Browse the repository at this point in the history
obs_base is going to start accruing more formatters
so it makes sense to put them all in one place.

Leave the FitsRawFormatterBase in the root directory
but it now is exported by default and so is renamed
to use an _
  • Loading branch information
timj committed Jun 12, 2020
1 parent 6ad37be commit 1882fc9
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 13 deletions.
7 changes: 2 additions & 5 deletions doc/lsst.obs.base/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@ Python API reference
.. automodapi:: lsst.obs.base
:no-main-docstr:

.. automodapi:: lsst.obs.base.fitsExposureFormatter
.. automodapi:: lsst.obs.base.formatters.fitsExposure
:no-main-docstr:

.. automodapi:: lsst.obs.base.fitsGenericFormatter
:no-main-docstr:

.. automodapi:: lsst.obs.base.fitsRawFormatterBase
.. automodapi:: lsst.obs.base.formatters.fitsGeneric
:no-main-docstr:
2 changes: 1 addition & 1 deletion python/lsst/obs/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from .exposureIdInfo import *
from .makeRawVisitInfo import *
from .makeRawVisitInfoViaObsInfo import *
from .fitsRawFormatterBase import *
from ._fitsRawFormatterBase import *
from .utils import *
from .ingest import *
from .defineVisits import *
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from lsst.daf.butler import FileDescriptor
import lsst.log

from .fitsExposureFormatter import FitsExposureFormatter
from .formatters.fitsExposure import FitsExposureFormatter
from .makeRawVisitInfoViaObsInfo import MakeRawVisitInfoViaObsInfo
from .utils import createInitialSkyWcs, InitialSkyWcsError

Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import os.path

from lsst.daf.butler.formatters.fileFormatter import FileFormatter
from lsst.daf.butler.formatters.file import FileFormatter


class FitsGenericFormatter(FileFormatter):
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/obs/base/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from lsst.pipe.base import Task

from ._instrument import Instrument, makeExposureRecordFromObsInfo
from .fitsRawFormatterBase import FitsRawFormatterBase
from ._fitsRawFormatterBase import FitsRawFormatterBase


@dataclass
Expand Down
8 changes: 4 additions & 4 deletions tests/test_butlerFits.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@
# Want to check disassembly so can't use InMemory
cls: lsst.daf.butler.datastores.posixDatastore.PosixDatastore
formatters:
ExposureCompositeF: lsst.obs.base.fitsExposureFormatter.FitsExposureFormatter
ExposureCompositeF: lsst.obs.base.formatters.fitsExposure.FitsExposureFormatter
lossless:
formatter: lsst.obs.base.fitsExposureFormatter.FitsExposureFormatter
formatter: lsst.obs.base.formatters.fitsExposure.FitsExposureFormatter
parameters:
recipe: lossless
uncompressed:
formatter: lsst.obs.base.fitsExposureFormatter.FitsExposureFormatter
formatter: lsst.obs.base.formatters.fitsExposure.FitsExposureFormatter
parameters:
recipe: noCompression
lossy:
formatter: lsst.obs.base.fitsExposureFormatter.FitsExposureFormatter
formatter: lsst.obs.base.formatters.fitsExposure.FitsExposureFormatter
parameters:
recipe: lossyBasic
composites:
Expand Down

0 comments on commit 1882fc9

Please sign in to comment.