tutorial.rst 775 Bytes
Newer Older
BO ZHANG's avatar
BO ZHANG committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
How to use CsstMscData
======================

*CsstMscData* is inherited from *CsstData*.

Example:

.. code-block:: python
    :linenos:

    # set file path
    fp = "MSC_CLB_210525120000_100000000_06_raw.fits"
    # import CsstMscImgData
    from csst.msc import CsstMscImgData
    # read data
    data = CsstMscImgData.read(fp)

To show the info of data:

.. code-block:: python
    :linenos:

    # print info
    print("data: ", data)
    print("instrument: ", data.get_l0keyword("pri", "INSTRUME"))
    print("object: ", data.get_l0keyword("pri", "OBJECT"))

The output:

.. code-block::
    :linenos:

    data:  <CsstMscImgData: MSC CCD16>
    instrument:  MSC
    object:  100000279

BO ZHANG's avatar
BO ZHANG committed
37
38
39
40
41
Full code is below


.. literalinclude:: ../../examples/example_csstmscdata.py