Commit 8ef59edf authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

added dm.query_rc to doc

parent ac4ac4d3
Loading
Loading
Loading
Loading
Loading
+28 −12
Original line number Diff line number Diff line
@@ -65,39 +65,55 @@ You will get the outputs:
    In your local development environment, you have to use
    ``CsstMsDataManager.from_dir(...)`` to initialize it.

Attributes
^^^^^^^^^^

Some attributes can be accessed as below.

.. code-block:: python

    # access L0 directory
    dm_mbi.dir_l0
    dm.dir_l0
    # access L1 directory
    dm_mbi.dir_l1
    dm.dir_l1
    # access dir_pcref
    dm_mbi.dir_pcref
    dm.dir_pcref
    # access path_aux
    dm_mbi.path_aux
    dm.path_aux
    # access ver_sim
    dm_mbi.ver_sim
    dm.ver_sim
    # access target detectors
    dm_mbi.target_detectors
    dm.target_detectors
    # access available detectors
    dm_mbi.available_detectors
    dm.available_detectors
    # define an L1 file (detector-specified)
    dm_mbi.l1_detector(detector=6)
    dm.l1_detector(detector=6)
    # define an L1 file (non-detector-specified)
    dm_mbi.l1_file("flipped_image.fits")
    dm.l1_file("flipped_image.fits")

To get master files:

.. code-block:: python

    # to get bias
    dm_mbi.get_bias()
    dm.get_bias()
    # to get dark
    dm_mbi.get_dark()
    dm.get_dark()
    # to get flat
    dm_mbi.get_flat()
    dm.get_flat()

Query Reference Catalog
^^^^^^^^^^^^^^^^^^^^^^^

``CsstMsDataManager`` provides a method ``query_rc`` to query reference catalog from ``DFS``.

.. code-block:: python

    cat = dm.query_rc(ra=180, dec=0, radius=2, min_mag=0, max_mag=30)
    if cat is None:
        print("The query failed!")
    else:
        print("The query succeeded!")


Access code to data products