Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_proto
Commits
f8cf63f7
Commit
f8cf63f7
authored
Oct 26, 2022
by
BO ZHANG
🏀
Browse files
new doc for CsstMsDataManager
parent
1bb2253e
Pipeline
#236
passed with stages
in 25 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
doc/source/ch08_csst_common.rst
View file @
f8cf63f7
...
@@ -9,23 +9,26 @@ Package source code and installation guide can be found in the link below.
...
@@ -9,23 +9,26 @@ Package source code and installation guide can be found in the link below.
``csst_common.data_manager.CsstMsDataManager``
``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
.. code-block:: python
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(
dm_mbi = 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
dir_l0="", # the L0/input directory
dir_l1="", # the L1/output directory
dir_l1="", # the L1/output directory
dir_pcref="", # position calibration reference (will be deprecated)
dir_pcref="", # position calibration reference (will be deprecated)
path_aux="", # aux file paths (master bias, dark, flat)
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"
datatype="mbi", # "mbi", "sls" or "all"
)
)
dm_mbi.set_detectors(detectors=None) # use all available detectors
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
.. code-block:: python
# for a quick start ()
# for a quick start ()
...
@@ -39,10 +42,11 @@ A class that helps developers to access simulation files.
...
@@ -39,10 +42,11 @@ A class that helps developers to access simulation files.
.. note::
.. note::
This ``quickstart`` method is ONLY available on
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
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
.. code-block:: python
...
@@ -65,6 +69,8 @@ A class that helps developers to access simulation files.
...
@@ -65,6 +69,8 @@ A class that helps developers to access simulation files.
# define an L1 file (non-detector-specified)
# define an L1 file (non-detector-specified)
dm_mbi.l1_file("flipped_image.fits")
dm_mbi.l1_file("flipped_image.fits")
To get master files:
.. code-block:: python
.. code-block:: python
# to get bias
# to get bias
...
@@ -74,6 +80,7 @@ A class that helps developers to access simulation files.
...
@@ -74,6 +80,7 @@ A class that helps developers to access simulation files.
# to get flat
# to get flat
dm_mbi.get_flat()
dm_mbi.get_flat()
Access code to data products
Access code to data products
----------------------------
----------------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment