Commit 487d90b2 authored by Chen Yili's avatar Chen Yili
Browse files

Update CpicImgSim/config.py

parent 58ce420e
import os, yaml import os, yaml
import warnings import warnings
cpism_refdata = 'D:/CPIC_image_process/cpic-img-sim-master/cpism_refdata' cpism_refdata = '/home/ubuntu/Downloads/cpic-img-sim-master/cpic-img-sim-master/cpism_refdata'
print(cpism_refdata)
if not os.path.exists(cpism_refdata): # pragma: no cover if not os.path.exists(cpism_refdata): # pragma: no cover
raise Exception( raise Exception(
"Can not find CPISM reference data.") "Can not find CPISM reference data.")
os.environ['PYSYN_CDBS'] = '/home/ubuntu/Downloads/cpic-img-sim-master/cpic-img-sim-master/trd/grp/redcat/trds/'
if not os.path.exists(os.environ.get('PYSYN_CDBS', './trd')): # pragma: no cover if not os.path.exists(os.environ.get('PYSYN_CDBS', '/home/ubuntu/Downloads/cpic-img-sim-master/cpic-img-sim-master/trd/grp/redcat/trds/')): # pragma: no cover
raise Exception( raise Exception(
"Can not find PYSYN Stellar reference data.") "Can not find PYSYN Stellar reference data.")
...@@ -53,7 +53,7 @@ def which_focalplane(band): ...@@ -53,7 +53,7 @@ def which_focalplane(band):
If the band is not in ['f565', 'f661', 'f743', 'f883', 'f940', 'f1265', 'f1425', 'f1542', 'wfs'] If the band is not in ['f565', 'f661', 'f743', 'f883', 'f940', 'f1265', 'f1425', 'f1542', 'wfs']
""" """
band = band.lower() band = band.lower()
if band in ['f520', 'f662', 'f720', 'f850']: if band in ['f565', 'f661', 'f743', 'f883']:
return 'vis' return 'vis'
if band in ['f940', 'f1265', 'f1425', 'f1542']: if band in ['f940', 'f1265', 'f1425', 'f1542']:
return 'nir' return 'nir'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment