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

updated doc for CsstMsDataManager

parent f8cf63f7
Pipeline #237 passed with stages
in 17 seconds
...@@ -17,32 +17,51 @@ To initilize from local directory: ...@@ -17,32 +17,51 @@ To initilize from local directory:
from csst_common.data_manager import CsstMsDataManager from csst_common.data_manager import CsstMsDataManager
# for full basic initialization # for full basic initialization
dm_mbi = CsstMsDataManager.from_dir( dm = CsstMsDataManager.from_dir(
ver_sim="C5.2", # version of simulation, "C5.2" is the latest ver_sim="C5.2", # version of simulation, "C5.2" is the latest
dir_l0="", # the L0/input directory datatype="mbi", # data type, "mbi", "sls" or "all"
dir_l1="", # the L1/output directory dir_l0=".", # the L0/input directory
dir_pcref="", # position calibration reference (will be deprecated) dir_l1=".", # the L1/output directory
path_aux="", # aux file paths (master bias, dark, flat) path_aux="", # aux file paths (master bias, dark, flat)
datatype="mbi", # "mbi", "sls" or "all" dfs_mode=False, # if True, use DFS in pipeline modules
dfs_node='kmust', # DFS server, chosen from {"kmust", "pml"}
) )
dm_mbi.set_detectors(detectors=None) # use all available detectors dm.target_detectors = None # use all available detectors
In particular, if you are on ``dandelion`` or ``PM node``, you can use a ``quickstart`` method.
In particular, if you are on ``dandelion`` or ``PML node``, you can use a ``quickstart`` method.
.. code-block:: python .. code-block:: python
# for a quick start () # for a quick start ()
dm_mbi = CsstMsDataManager.quickstart( dm = CsstMsDataManager.quickstart(
ver_sim="C5.2", ver_sim='C5.2', # version of simulation, only "C5.2" is supported
datatype="mbi", datatype='mbi', # data type, "mbi", "sls" or "all"
dir_l1=".", dir_l1='.', # the L1/output directory
exposure_id=100 # the 100th exposure exposure_id=100, # the exposure ID
dfs_mode=False, # if True, use DFS in pipeline modules
dfs_node='kmust', # DFS server, chosen from {"kmust", "pml"}
) )
dm_mbi.set_detectors(detectors=None) # use all available detectors dm
You will get the outputs:
.. code-block::
<CsstMsDataManager>
Data type = mbi
Valid detectors = [6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25]
Available detectors = [6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25]
Target detectors = [6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25]
dir_l0 = /nfsdata/share/csst_simulation_data/Cycle-5-SimuData/multipleBandsImaging/NGP_AstrometryON_shearOFF/MSC_0000100/
dir_l1 = .
dfs_mode = False
dfs_node = kmust
.. note:: .. note::
This ``quickstart`` method is ONLY available on This ``quickstart`` method is ONLY available on
``dandelion`` or the ``Purple Mountain Lab node``. ``dandelion`` or the ``PML node``.
In your local development environment, you have to use In your local development environment, you have to use
``CsstMsDataManager.from_dir(...)`` to initialize it. ``CsstMsDataManager.from_dir(...)`` to initialize it.
......
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