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

use re.fullmatch

parent b9013088
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -63,6 +63,6 @@ def flip_multiple_images_mp(imgs: list, n_jobs: int) -> list:

def flip_multiple_images_jl(imgs: list, n_jobs: int) -> list:
    """ parallel with joblib """
    return joblib.Parallel(n_jobs=n_jobs)(
    return joblib.Parallel(n_jobs=n_jobs, backend="multiprocessing")(
        joblib.delayed(flip_image)(img) for img in imgs
    )

doc/preview.sh

100644 → 100755
+0 −0

File mode changed from 100644 to 100755.

+19 −0
Original line number Diff line number Diff line
Data

.. code-block:: python

    import re
    pattern = re.compile(
        r"(?P<telescope>[A-Z]+)_"
        r"(?P<instrument>[A-Z]+)_"
        r"(?P<project>[A-Z]+)_"
        r"(?P<data_type>[A-Z]+)_"
        r"(?P<exp_start>[0-9]{14})_"
        r"(?P<exp_stop>[0-9]{14})_"
        r"(?P<obs_id>[0-9]{11})_"
        r"(?P<detector>[0-9]{2})_"
        r"L(?P<level>[0-9]{1}+)_"
        r"V(?P<version>[0-9]{2}+).fits"
    )
    mo = re.fullmatch(pattern, r"CSST_MSC_MS_SCI_20270626203558_20270626203828_100000066_01_L0_1.fits")
    print(mo.groupdict())
 No newline at end of file

install.sh

deleted100644 → 0
+0 −10
Original line number Diff line number Diff line
echo "CSST-PROTO Installer"
echo "=============================================="

pip uninstall csst_proto -y

echo "Installing CSST-PROTO"
echo "➡==============================================="
pip install git+https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto.git
echo "➡==============================================="
echo "🇨🇳🇨🇳🇨🇳🚀🚀🚀Done!"

install_local.sh

deleted100644 → 0
+0 −8
Original line number Diff line number Diff line
#!/usr/bin/env bash
rm -rf build
rm -rf dist
python setup.py build_ext
#python setup.py install
python setup.py sdist
pip install dist/*.tar.gz --force-reinstall
rm -rf ./*.egg-info
 No newline at end of file