Newer
Older
import joblib
from astropy.io import fits
from csst.core.processor import CsstProcessor
from csst.msc.data_manager import CsstMscDataManager
"""
Parameters
----------
dm:
csst data manager, used to manage the input/output file paths
n_jobs:
number of jobs launched
"""
super(CsstProcFlipImage, self).__init__()
self.dm = dm
self.n_jobs = n_jobs
def run(self, debug: bool = False):
Parameters
----------
debug:
if True, use debug mode
Returns
-------
joblib.delayed(CsstProcFlipImage.run_one_detector)(this_ccd_id)
for this_ccd_id in self.dm.target_ccd_ids)
return img_flipped_list
def prepare(self, **kwargs):
""" prepare the environment """
return
def cleanup(self):
""" clean up the environment """
return
@staticmethod
def run_one_detector(dm: CsstMscDataManager, ccd_id: int = 6):
Parameters
----------
dm:
csst data manager, used to manage the input/output file paths
ccd_id:
detector id
Returns
-------
the flipped image