diff --git a/.gitignore b/.gitignore index 81e9340fad5ab1eb0ea38f42907716685ef71c6d..a75e9e511e399ad7905845c33c77106ddbf51132 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,11 @@ build/ dist/ .VSCodeCounter/ __pycache__/ +# added by Dongwei Fan +.DS_Store +*.pyd +*.pkl +!survey_sim/strategies/data/skyMap_Init.pkl +survey_sim/cython_function/fast_interpolate.c +survey_sim/satOrbit/locate_sat_cy.c +# \ No newline at end of file diff --git a/config/config_surveysim_fdw.yaml b/config/config_surveysim_fdw.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ca4fc348e40496a1588ad1c7d81a5ae09ce43ca1 --- /dev/null +++ b/config/config_surveysim_fdw.yaml @@ -0,0 +1,32 @@ +out_path_param: + wokr_dir: D:/Projects/CSST/dev/csst-planning/upload/sim/output # define the folder of output file + out_filename_prefix: test_2461876_1 # output file prefix, 3 files: prefix_plan.json, prefix_info.dat, prefix_log.log + +# input_survey_data ---- whether to use input survey data; if yes, set the file name (including path), otherwise set null +input_survey_data: null +# input_survey_data: /Users/zhangxin/Work/SurveyPlan/CSST_Survey/csst-msc-c11-sls-v1_W5.json # optional + +outdata_param: + dataset: version-1.0 + obs_group: o1 + sub_mod: OM1-1 +sim_param: + # start_time: 2461876.0 + # end_time: 2462581.0 + start_time: 2459812.0 + end_time: 2459812.05 + bettery_level: 97200 + sky_map: null # sky status file + sci_data_start_id: 0 +calib_seting: + mutil_out: YES + inner_calib_id_start: 0 + inner_calib_year: NO + inner_calib_year_file: {2022: "D:/Projects/CSST/dev/csst-planning/upload/sim/output/calibration_config/internal-cal-split.json"} + inner_calib_saa: NO + inner_calib_saa_file: "D:/Projects/CSST/dev/csst-planning/upload/sim/output/calibration_config/saa-bias.json" + calib_starField_setting: + calib_enable: NO + calib_time: [[2459812.1, 2459813.1]] + calib_cat_file: ['D:/Projects/CSST/dev/csst-planning/upload/sim/output/calibration_config/photflat-5x5grid_pointings/'] + diff --git a/run_survey_sim.py b/run_survey_sim.py index 3fbbd5faad59b0fd3eb8aa0c82a0cab5d4613042..cb11b07f3c8160c596bb3842984b73d6da283be5 100644 --- a/run_survey_sim.py +++ b/run_survey_sim.py @@ -134,11 +134,24 @@ def addSkyList_inputRADEC(radecs): if __name__ == '__main__': + current_dir = os.path.dirname(os.path.abspath(__file__)) + print("current_dir", current_dir) if len(sys.argv) < 2: print("Error: input parameter error, must be : config file name") + config_file = os.path.join( + current_dir, "config", "config_surveysim_fdw.yaml") + else: + config_file = sys.argv[1] + if not os.path.isabs(config_file): + config_file = os.path.join(current_dir, config_file) + + if not os.path.exists(config_file): + print("Error: config file not found, config file: ", config_file) + exit(1) - with open(sys.argv[1], "r") as f: + with open(config_file, "r") as f: config_data = yaml.safe_load(f) + print(config_data) # config_fn = Path(sys.argv[1]) # with config_fn.open("r", encoding="utf-8") as f: # config_data = json.load(f) diff --git a/survey_sim/surveyStat/data/areaStat.dll b/survey_sim/surveyStat/data/areaStat.dll new file mode 100644 index 0000000000000000000000000000000000000000..631e3d2a9ef004a5f264e1e4716bc3c1c43a69b2 Binary files /dev/null and b/survey_sim/surveyStat/data/areaStat.dll differ