Commit f8cf63f7 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

new doc for CsstMsDataManager

parent 1bb2253e
Pipeline #236 passed with stages
in 25 seconds
......@@ -9,23 +9,26 @@ Package source code and installation guide can be found in the link below.
``csst_common.data_manager.CsstMsDataManager``
----------------------------------------------
A class that helps developers to access simulation files.
This class provides an interface to switch between local files and DFS.
To initilize from local directory:
.. code-block:: python
from csst_common.data_manager import CsstMsDataManager
# for full basic initialization
dm_mbi = CsstMsDataManager(
dm_mbi = CsstMsDataManager.from_dir(
ver_sim="C5.2", # version of simulation, "C5.2" is the latest
dir_l0="", # the L0/input directory
dir_l1="", # the L1/output directory
dir_pcref="", # position calibration reference (will be deprecated)
path_aux="", # aux file paths (master bias, dark, flat)
assert_all_detectors=False, # if True, assert all detectors are available
datatype="mbi", # "mbi", "sls" or "all"
)
dm_mbi.set_detectors(detectors=None) # use all available detectors
In particular, if you are on ``dandelion`` or ``PM node``, you can use a ``quickstart`` method.
.. code-block:: python
# for a quick start ()
......@@ -39,10 +42,11 @@ A class that helps developers to access simulation files.
.. note::
This ``quickstart`` method is ONLY available on
``dandelion`` and the Purple Mountain Lab node.
``dandelion`` or the ``Purple Mountain Lab node``.
In your local development environment, you have to use
``CsstMsDataManager(...)`` to initialize it.
``CsstMsDataManager.from_dir(...)`` to initialize it.
Some attributes can be accessed as below.
.. code-block:: python
......@@ -65,6 +69,8 @@ A class that helps developers to access simulation files.
# define an L1 file (non-detector-specified)
dm_mbi.l1_file("flipped_image.fits")
To get master files:
.. code-block:: python
# to get bias
......@@ -74,6 +80,7 @@ A class that helps developers to access simulation files.
# to get flat
dm_mbi.get_flat()
Access code to data products
----------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment