From 2ca97cd4c923019a31fc998e1310e8d34cbb8d96 Mon Sep 17 00:00:00 2001 From: BO ZHANG Date: Thu, 9 Mar 2023 15:21:22 +0800 Subject: [PATCH] add naming conventions --- doc/source/ch07_simulation.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/source/ch07_simulation.rst b/doc/source/ch07_simulation.rst index 2d4d6e9..be02c8c 100644 --- a/doc/source/ch07_simulation.rst +++ b/doc/source/ch07_simulation.rst @@ -23,3 +23,25 @@ Simulation data path .. note:: Presently, the ``CsstMsDataManager`` only supports ``C5.2`` simulation. + + +Naming conventions +------------------ + +.. code-block:: python + + import re + pattern = re.compile( + r"CSST_" + r"(?P[A-Z]+)_" + r"(?P[A-Z]+)_" + r"(?P[A-Z]+)_" + r"(?P[0-9]{14})_" + r"(?P[0-9]{14})_" + r"(?P[0-9]{9})_" + r"(?P[0-9]{2})_" + r"L(?P[0-9]+)_" + r"(?P[A-Z0-9]+).fits" + ) + mo = re.search(pattern, r"CSST_MSC_MS_SCI_20270626203558_20270626203828_100000066_01_L0_1.fits") + print(mo.groupdict()) -- GitLab