Commit 59153d14 authored by JX's avatar JX 😵
Browse files

Merge remote-tracking branch 'origin/develop'

parents 885d85b2 5c59486a
Loading
Loading
Loading
Loading
Loading
+73 −73

File changed.File mode changed from 100755 to 100644.

Preview size limit exceeded, changes collapsed.

+6 −0
Original line number Diff line number Diff line
@@ -206,6 +206,12 @@ def add_objects(self, chip, filt, tel, pointing, catalog, obs_param):
        except Exception as e:
            traceback.print_exc()
            self.chip_output.Log_error(e)
            self.chip_output.Log_error(
                "pointing: #%d, chipID: %d" % (pointing.id, chip.chipID))
            if obj.type == "galaxy":
                self.chip_output.Log_error("obj id: %s" % (obj.param['id']))
                self.chip_output.Log_error("    e1: %.5f\n    e2: %.5f\n    size: %f\n    bfrac: %f\n    detA: %f\n    g1: %.5f\n    g2: %.5f\n" % (
                    obj.param['e1'], obj.param['e2'], obj.param['size'], obj.param['bfrac'], obj.param['detA'], obj.param['g1'], obj.param['g2']))

        # Unload SED:
        obj.unload_SED()
+9 −10
Original line number Diff line number Diff line
@@ -82,17 +82,16 @@ def quantization_and_output(self, chip, filt, tel, pointing, catalog, obs_param)
    
    
    hdu1 = fits.PrimaryHDU(header=self.h_prim)
    hdu1.add_checksum()
    hdu1.header.comments['CHECKSUM'] = 'HDU checksum'
    hdu1.header.comments['DATASUM'] = 'data unit checksum'
 
    self.updateHeaderInfo(header_flag='ext', keys = ['DATASECT'], values = [str(chip.img.array.shape[1]) + 'x' + str(chip.img.array.shape[0])])
    hdu2 = fits.ImageHDU(chip.img.array, header=self.h_ext)
    hdu2.add_checksum()
    hdu2.header.comments['XTENSION'] = 'extension type'
    hdu2.header.comments['CHECKSUM'] = 'HDU checksum'
    hdu2.header.comments['DATASUM'] = 'data unit checksum'
    hdu2.header.comments["XTENSION"] = "image extension"
    hdu1 = fits.HDUList([hdu1, hdu2])
    hdu1.writeto(fname, output_verify='ignore', overwrite=True)
    
    hdu = fits.HDUList([hdu1, hdu2])
    hdu[0].add_datasum(when='data unit checksum')
    hdu[0].add_checksum(when='HDU checksum', override_datasum=True)
    hdu[1].add_datasum(when='data unit checksum')
    hdu[1].add_checksum(when='HDU checksum', override_datasum=True)
    hdu.writeto(fname, output_verify='ignore', overwrite=True)

    return chip, filt, tel, pointing
+9 −6
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
# can add some of the command-line arguments here as well;
# ok to pass either way or both, as long as they are consistent
work_dir: "/public/home/fangyuedong/project/workplace/"
run_name: "magnification_test"
run_name: "no_nonlinearity_test"

# Project cycle and run counter are used to name the outputs
project_cycle: 9
@@ -32,11 +32,13 @@ run_option:
catalog_options:
  input_path:
    cat_dir: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/"
    star_cat: "starcat/"
    # star_cat: "starcat/"
    star_cat: "starcat_C9/"
    galaxy_cat: "qsocat/cat2CSSTSim_bundle-50sqDeg/"

  SED_templates_path:
    star_SED: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/SpecLib.hdf5"
    # star_SED: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/SpecLib.hdf5"
    star_SED: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/starcat_C9/"
    galaxy_SED: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/sedlibs/"
    AGN_SED: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/qsocat/qsosed/"

@@ -44,7 +46,7 @@ catalog_options:
  star_only: NO

  # Only simulate galaxies?
  galaxy_only: YES
  galaxy_only: NO

  # rotate galaxy ellipticity
  rotateEll: 0. # [degree]
@@ -57,7 +59,8 @@ obs_setting:
  # if you just want to run default pointing:
  # - pointing_dir: null
  # - pointing_file: null
  pointing_file: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/pointing50_C9/pointing_50_1_n.dat"
  # pointing_file: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/pointing50_C9/pointing_50_1_n.dat"
  pointing_file: "/public/home/fangyuedong/project/unit_test_data/pointing_for_test.dat"

  obs_config_file: "/public/home/fangyuedong/project/csst_msc_sim/config/obs_config_SCI_WIDE_phot.yaml"

@@ -65,7 +68,7 @@ obs_setting:
  # - give a list of indexes of pointings: [ip_1, ip_2...]
  # - run all pointings: null
  # Note: only valid when a pointing list is specified
  run_pointings: [0]
  run_pointings: [1]

  # Whether to enable astrometric modeling
  enable_astrometric_model: True
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ obs_id: "00000001" # this setting will only be used if pointing list file is not
# Define list of chips
# run_chips: [6,7,8,9,11,12,13,14,15,16,17,18,19,20,22,23,24,25]
#run_chips: [1,2,3,4,5,10,21,26,27,28,29,30]
run_chips: [8]
run_chips: [9]

# Define observation sequence
call_sequence:
Loading