Added examples
This commit is contained in:
33
examples/2_directory_processing.py
Normal file
33
examples/2_directory_processing.py
Normal file
@@ -0,0 +1,33 @@
|
||||
from nuwavdet import nuwavdet as nw
|
||||
|
||||
INPUT_FOLDER = r'path_to_directory'
|
||||
OUTPUT_FOLDER = r'.//Output'
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# BEGIN PROCESSING ALL THE OBSERVATIONS INSIDE THE FOLDER
|
||||
nw.process_folder(input_folder=INPUT_FOLDER,
|
||||
start_new_file='y',
|
||||
fits_folder=OUTPUT_FOLDER,
|
||||
thresh=(3, 2),
|
||||
cpu_num=10
|
||||
)
|
||||
|
||||
# IF THE PROCESSING WAS INTERRUPTED YOU CAN CONTINUE IT WITH THE SAME CODE
|
||||
# BY CHANGING THE start_new_file TO 'n'.
|
||||
|
||||
# THE STRUCTURE OF THE FOLDER IS
|
||||
# OUTPUT_FOLDER
|
||||
# __overview.csv csv-table with observations metadata
|
||||
# __overvies.fits fits-table with the same metadata
|
||||
# __overview_skipped.csv csv-table with the skipped observations
|
||||
# __Region folder for region mask images
|
||||
# ____<obsid><DET>_region.fits
|
||||
# __Region_raw folder for region masks in RAW coordinates
|
||||
# ____<obsid><DET>_reg_raw.fits
|
||||
# __Wav_sum folder for sum of wavelet layers
|
||||
# ____<obsid><DET>_wav_sum.fits
|
||||
|
||||
# Note nw.process_folder uses multiprocessing with cpu_num cores.
|
||||
# The number of cores can be manually chosen or automatically
|
||||
# detected if cpu_num = 0.
|
||||
Reference in New Issue
Block a user