Commit 8b77095f authored by xin's avatar xin
Browse files

syn master code

parent 25dafa5a
......@@ -23,15 +23,13 @@ except ImportError:
NSIDE = 128
class NGPCatalog(CatalogBase):
def __init__(self, config, chip, pointing, **kwargs):
def __init__(self, config, chip, pointing, chip_output, **kwargs):
super().__init__()
self.cat_dir = os.path.join(config["data_dir"], config["input_path"]["cat_dir"])
self.seed_Av = config["random_seeds"]["seed_Av"]
if "logger" in kwargs:
self.logger = kwargs["logger"]
else:
self.logger = None
self.chip_output = chip_output
self.logger = chip_output.logger
with pkg_resources.path('Catalog.data', 'SLOAN_SDSS.g.fits') as filter_path:
self.normF_star = Table.read(str(filter_path))
......@@ -58,9 +56,17 @@ class NGPCatalog(CatalogBase):
else:
self.rotation = 0.
# Update output .cat header with catalog specific output columns
self._add_output_columns_header()
self._get_healpix_list()
self._load()
def _add_output_columns_header(self):
self.add_hdr = " model_tag teff logg feh"
self.add_fmt = " %10s %8.4f %8.4f %8.4f"
self.chip_output.update_ouptut_header(additional_column_names=self.add_hdr)
def _get_healpix_list(self):
self.sky_coverage = self.chip.getSkyCoverageEnlarged(self.chip.img.wcs, margin=0.2)
ra_min, ra_max, dec_min, dec_max = self.sky_coverage.xmin, self.sky_coverage.xmax, self.sky_coverage.ymin, self.sky_coverage.ymax
......@@ -133,10 +139,8 @@ class NGPCatalog(CatalogBase):
param['dec'] = dec_arr[igals]
param['ra_orig'] = gals['ra_true'][igals]
param['dec_orig'] = gals['dec_true'][igals]
if not self.chip.isContainObj(ra_obj=param['ra'], dec_obj=param['dec'], margin=200):
continue
param['mag_use_normal'] = gals['mag_true_g_lsst'][igals]
if param['mag_use_normal'] >= 24:
if param['mag_use_normal'] >= 26.5:
continue
param['z'] = gals['redshift_true'][igals]
param['model_tag'] = 'None'
......@@ -173,16 +177,23 @@ class NGPCatalog(CatalogBase):
param['av'] = 0.6 * param['av'] / 3.0 # for quasar, av=[0, 0.2], 3.0=av.max-av.im
param['star'] = 2 # Quasar
# NOTE: this cut cannot be put before the SED type has been assigned
if not self.chip.isContainObj(ra_obj=param['ra'], dec_obj=param['dec'], margin=200):
continue
self.ids += 1
# param['id'] = self.ids
param['id'] = gals['galaxyID'][igals]
if param['star'] == 0:
obj = Galaxy(param, self.rotation, logger=self.logger)
self.objs.append(obj)
if param['star'] == 2:
obj = Quasar(param, logger=self.logger)
self.objs.append(obj)
# Need to deal with additional output columns
obj.additional_output_str = self.add_fmt%("n", 0., 0., 0.)
self.objs.append(obj)
def _load_stars(self, stars, pix_id=None):
nstars = len(stars['sourceID'])
......@@ -234,7 +245,7 @@ class NGPCatalog(CatalogBase):
if not self.chip.isContainObj(ra_obj=param['ra'], dec_obj=param['dec'], margin=200):
continue
param['mag_use_normal'] = stars['app_sdss_g'][istars]
if param['mag_use_normal'] >= 26:
if param['mag_use_normal'] >= 26.5:
continue
self.ids += 1
# param['id'] = self.ids
......@@ -247,6 +258,10 @@ class NGPCatalog(CatalogBase):
param['z'] = 0.0
param['star'] = 1 # Star
obj = Star(param, logger=self.logger)
# Append additional output columns to the .cat file
obj.additional_output_str = self.add_fmt%(param["model_tag"], param['teff'], param['logg'], param['feh'])
self.objs.append(obj)
def _load(self, **kwargs):
......@@ -302,7 +317,8 @@ class NGPCatalog(CatalogBase):
raise ValueError("Object type not known")
speci = interpolate.interp1d(wave, flux)
# lamb = np.arange(2500, 10001 + 0.5, 0.5)
lamb = np.arange(2400, 11001 + 0.5, 0.5)
# lamb = np.arange(2400, 11001 + 0.5, 0.5)
lamb = np.arange(2000, 18001 + 0.5, 0.5)
y = speci(lamb)
# erg/s/cm2/A --> photo/s/m2/A
all_sed = y * lamb / (cons.h.value * cons.c.value) * 1e-13
......
......@@ -11,6 +11,7 @@ class ChipOutput(object):
self.imgKey2 = imgKey2
self.exptime = exptime
self.mjdTime = mjdTime
self.pointing_type = pointing_type
if (ra_cen is not None) and (dec_cen is not None):
self.ra_cen = ra_cen
self.dec_cen = dec_cen
......@@ -23,95 +24,59 @@ class ChipOutput(object):
# self.cat_name = 'MSC_' + config["obs_setting"]["date_obs"] + config["obs_setting"]["time_obs"] + "_" + str(pointing_ID).rjust(7, '0') + "_" + self.chipLabel.rjust(2,'0') + ".cat"
self.cat_name = "MSC_1%s_chip_%s_filt_%s"%(str(pointing_ID).rjust(7, '0'), focal_plane.getChipLabel(chip.chipID), filt.filter_type) + ".cat"
self.cat_name = "MSC_1%s_chip_%s_filt_%s"%(str(pointing_ID).rjust(8, '0'), focal_plane.getChipLabel(chip.chipID), filt.filter_type) + ".cat"
self.subdir = subdir
# Setup logger for each chip
logger_filename = "MSC_1%s_chip_%s_filt_%s"%(str(pointing_ID).rjust(7, '0'), focal_plane.getChipLabel(chip.chipID), filt.filter_type) + ".log"
logger_filename = "MSC_1%s_chip_%s_filt_%s"%(str(pointing_ID).rjust(8, '0'), focal_plane.getChipLabel(chip.chipID), filt.filter_type) + ".log"
self.logger = logging.getLogger()
fh = logging.FileHandler(os.path.join(self.subdir, logger_filename), mode='w+', encoding='utf-8')
fh.setLevel(logging.DEBUG)
self.logger.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logging.getLogger('numba').setLevel(logging.WARNING)
# formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
formatter = logging.Formatter('%(asctime)s - %(msecs)d - %(levelname)-8s - [%(filename)s:%(lineno)d] - %(message)s')
fh.setFormatter(formatter)
self.logger.addHandler(fh)
hdr1 = "# obj_ID ID_chip filter xImage yImage ra dec ra_orig dec_orig z mag obj_type "
hdr2 = "thetaR bfrac hlr_disk hlr_bulge e1_disk e2_disk e1_bulge e2_bulge g1 g2 "
hdr3 = "sed_type av redden "
hdr4 = "pm_ra pm_dec RV parallax\n"
hdr4 = "pm_ra pm_dec RV parallax"
fmt1 = "%10d %4d %5s %10.3f %10.3f %15.8f %15.8f %15.8f %15.8f %7.4f %8.4f %15s "
fmt2 = "%8.4f %8.4f %8.4f %8.4f %8.4f %8.4f %8.4f %8.4f %8.4f %8.4f "
fmt3 = "%2d %8.4f %8.4f "
fmt4 = "%15.8f %15.8f %15.8f %15.8f\n"
fmt4 = "%15.8f %15.8f %15.8f %15.8f"
self.hdr = hdr1 + hdr2 + hdr3 + hdr4
self.fmt = fmt1 + fmt2 + fmt3 + fmt4
self.logger.info("pointing_type = %s\n"%(pointing_type))
if pointing_type == 'MS':
def update_ouptut_header(self, additional_column_names=""):
self.hdr += additional_column_names
def create_output_file(self):
if self.pointing_type == 'MS':
self.cat = open(os.path.join(self.subdir, self.cat_name), "w")
self.logger.info("Creating catalog file %s ...\n"%(os.path.join(self.subdir, self.cat_name)))
if not self.hdr.endswith("\n"):
self.hdr += "\n"
self.cat.write(self.hdr)
# def updateHDR(self, hdr):
# hdrNew = [{"name":"RDNOISE", "value":self.chip.read_noise, "comment":"read noise in e-/pixel"},
# {"name":"DARK", "value":self.chip.dark_noise, "comment":"Dark noise (e-/pixel/s)"},
# {"name":"EXPTIME", "value":self.exptime, "comment":"exposure time in second"},
# {"name":"GAIN", "value":self.chip.gain, "comment":"CCD gain in e-/ADU"},
# {"name":"SATURATE","value":65535.0, "comment":"saturation level"},
# {"name":"CCDCHIP", "value":int(self.chipLabel), "comment":"chip ID in the CCD mosaic"},
# {"name":"FILTER", "value":self.filt.filter_type, "comment":"filter name"},
# {"name":"MJD-OBS", "value":self.mjdTime, "comment":"Modified Julian Date (MJD) of observation"},
# {"name":"DATE-OBS","value":self.imgKey1, "comment":"Date of observation"},
# {"name":"EQUINOX", "value":2000.0},
# {"name":"RADECSYS","value":"ICRS"},
# {"name":"RA", "value":self.ra_cen, "comment":"telescope pointing center"},
# {"name":"DEC", "value":self.dec_cen, "comment":"telescope pointing center"},
# {"name":"OBJECT", "value":"CSS-OS"},
# {"name":"WCSDIM", "value":2.0, "comment":"WCS Dimensionality"},
# {"name":"EXTNAME", "value":"IM1", "comment":"Extension name"},
# {"name":"BSCALE", "value":1.0},
# {"name":"BZERO", "value":0.0},
# {"name":"OBSID", "value":self.imgKey0, "comment":"Observation ID"},
# {"name":"CCDNAME", "value":"ccd"+self.chipLabel,"comment":"CCD name"},
# {"name":"RSPEED", "value":10.0, "comment":"Read speed"},
# {"name":"CHIPTEMP","value":-100.0, "comment":"Chip temperature"},
# {"name":"DATASEC", "value":"1:%d,1:%d"%(self.chip.npix_x,self.chip.npix_y), "comment":"Data section"},
# {"name":"CCDSUM", "value":self.chip.npix_x*self.chip.npix_y, "comment":"CCD pixel summing"},
# {"name":"NSUM", "value":self.chip.npix_x*self.chip.npix_y, "comment":"CCD pixel summing"},
# {"name":"AUTHOR", "value":"CSST-Sim Group"},
# {"name":"GROUP", "value":"Weak Lensing Working Group for CSST"}]
# for item in hdrNew:
# hdr.add_record(item)
# return hdr
# def cat_add_obj(self, obj, pos_img, snr, pos_shear, g1, g2):
def cat_add_obj(self, obj, pos_img, pos_shear):
ximg = pos_img.x - self.chip.bound.xmin + 1.0
yimg = pos_img.y - self.chip.bound.ymin + 1.0
# if obj.type == 'galaxy':
# line = self.fmt%(obj.id, int(self.chipLabel), self.filt.filter_type, ximg, yimg, obj.ra, obj.dec, obj.z, obj.getMagFilter(self.filt), obj.param["star"], obj.thetaR, obj.bfrac, obj.hlr_disk, obj.hlr_bulge,
# obj.e1_disk, obj.e2_disk, obj.e1_bulge, obj.e2_bulge,
# pos_shear.g1, pos_shear.g2, e1, e2, g1, g2, e1OBS, e2OBS, obj.sed_type, obj.param['av'], obj.param['redden'], 'n', 0, 0, 0)
# elif obj.type == "quasar":
# line = self.fmt % (obj.id, int(self.chipLabel), self.filt.filter_type, ximg, yimg, obj.ra, obj.dec, obj.z,
# obj.getMagFilter(self.filt), obj.param["star"], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
# pos_shear.g1, pos_shear.g2, e1, e2, g1, g2, e1OBS, e2OBS, obj.sed_type, obj.param['av'], obj.param['redden'], 'n', 0.0, 0.0, 0.0)
# else:
# line = self.fmt%(obj.id, int(self.chipLabel), self.filt.filter_type, ximg, yimg, obj.ra, obj.dec, obj.z, obj.getMagFilter(self.filt), obj.param["star"], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
# pos_shear.g1, pos_shear.g2, e1, e2, g1, g2, e1OBS, e2OBS, 0, 0.0, 0.0, obj.param['model_tag'], obj.param['teff'], obj.param['logg'],obj.param['feh'])
# print(
# obj.id, int(self.chipLabel), self.filt.filter_type, ximg, yimg, obj.ra, obj.dec, obj.ra_orig, obj.dec_orig, obj.z, obj.getMagFilter(self.filt), obj.type,
# obj.thetaR, obj.bfrac, obj.hlr_disk, obj.hlr_bulge, obj.e1_disk, obj.e2_disk, obj.e1_bulge, obj.e2_bulge, obj.g1, obj.g2,
# obj.sed_type, obj.av, obj.redden,
# obj.pmra, obj.pmdec, obj.rv, obj.parallax)
line = self.fmt%(
obj.id, int(self.chipLabel), self.filt.filter_type, ximg, yimg, obj.ra, obj.dec, obj.ra_orig, obj.dec_orig, obj.z, obj.getMagFilter(self.filt), obj.type,
obj.thetaR, obj.bfrac, obj.hlr_disk, obj.hlr_bulge, obj.e1_disk, obj.e2_disk, obj.e1_bulge, obj.e2_bulge, obj.g1, obj.g2,
obj.sed_type, obj.av, obj.redden,
obj.pmra, obj.pmdec, obj.rv, obj.parallax)
line += obj.additional_output_str
if not line.endswith("\n"):
line += "\n"
self.cat.write(line)
......@@ -33,6 +33,7 @@ class Chip(FocalPlane):
self.dark_exptime = float(config["ins_effects"]['dark_exptime'])
self.flat_exptime = float(config["ins_effects"]['flat_exptime'])
self.readout_time = float(config["ins_effects"]['readout_time'])
self.full_well = int(config["ins_effects"]["full_well"])
self.logger = logger
self.direct_Img_sls = direct_Img_sls
......@@ -96,16 +97,17 @@ class Chip(FocalPlane):
if filter_type in ['g', 'r', 'GV']: filename = 'Astro_MB.txt'
if filter_type in ['i', 'z', 'y', 'GI']: filename = 'Basic_NIR.txt'
# Mirror efficiency:
if filter_type == 'nuv': mirror_eff = 0.54
if filter_type == 'u': mirror_eff = 0.68
if filter_type in ['g', 'r', 'i', 'z', 'y']: mirror_eff = 0.8
if filter_type in ['GU', 'GV', 'GI']: mirror_eff = 1. # Not sure if this is right
# if filter_type == 'nuv': mirror_eff = 0.54
# if filter_type == 'u': mirror_eff = 0.68
# if filter_type in ['g', 'r', 'i', 'z', 'y']: mirror_eff = 0.8
# if filter_type in ['GU', 'GV', 'GI']: mirror_eff = 1. # Not sure if this is right
# path = os.path.join(self.ccdEffCurve_dir, filename)
# table = Table.read(path, format='ascii')
with pkg_resources.path('ObservationSim.Instrument.data.ccd', filename) as ccd_path:
table = Table.read(ccd_path, format='ascii')
throughput = galsim.LookupTable(x=table['col1'], f=table['col2']*mirror_eff, interpolant='linear')
# throughput = galsim.LookupTable(x=table['col1'], f=table['col2']*mirror_eff, interpolant='linear')
throughput = galsim.LookupTable(x=table['col1'], f=table['col2'], interpolant='linear')
bandpass = galsim.Bandpass(throughput, wave_type='nm')
return bandpass
......@@ -303,9 +305,8 @@ class Chip(FocalPlane):
hdu1.writeto(fname, output_verify='ignore', overwrite=True)
def addEffects(self, config, img, chip_output, filt, ra_cen, dec_cen, img_rot, exptime=150., pointing_ID=0, timestamp_obs=1621915200, pointing_type='MS', sky_map=None, tel=None, logger=None):
SeedGainNonuni = int(config["random_seeds"]["seed_gainNonUniform"])
SeedBiasNonuni = int(config["random_seeds"]["seed_biasNonUniform"])
SeedGainNonuni=int(config["random_seeds"]["seed_gainNonUniform"])
SeedBiasNonuni=int(config["random_seeds"]["seed_biasNonUniform"])
SeedRnNonuni = int(config["random_seeds"]["seed_rnNonUniform"])
SeedBadColumns = int(config["random_seeds"]["seed_badcolumns"])
SeedDefective = int(config["random_seeds"]["seed_defective"])
......@@ -340,7 +341,7 @@ class Chip(FocalPlane):
img.array[img.array > fullwell] = fullwell
img = img - sky_map - self.dark_noise * (self.exptime + 0.5 * self.readout_time)
return img
return img/self.exptime
if config["ins_effects"]["add_hotpixels"] == True:
......@@ -533,7 +534,7 @@ class Chip(FocalPlane):
# Output images for calibration pointing
######################################################################################
# Bias output
if config["output_setting"]["bias_output"] == True and pointing_type=='CAL':
if config["ins_effects"]["add_bias"] == True and config["output_setting"]["bias_output"] == True and pointing_type=='CAL':
if self.logger is not None:
self.logger.info(" Output N frame Bias files")
else:
......@@ -546,6 +547,7 @@ class Chip(FocalPlane):
ncombine=1, read_noise=self.read_noise, gain=1,
seed=SeedBiasNonuni+self.chipID,
logger=self.logger)
# Readout noise for Biases is not generated with random seeds. So readout noise for bias images can't be reproduced.
if config["ins_effects"]["cosmic_ray"] == True:
if config["ins_effects"]["cray_differ"] == True:
cr_map, cr_event_num = effects.produceCR_Map(
......@@ -601,7 +603,7 @@ class Chip(FocalPlane):
del BiasCombImg
# Export combined (ncombine, Vignetting + PRNU) & single vignetting flat-field file
if config["output_setting"]["flat_output"] == True and pointing_type=='CAL':
if config["ins_effects"]["flat_fielding"] == True and config["output_setting"]["flat_output"] == True and pointing_type=='CAL':
if self.logger is not None:
self.logger.info(" Output N frame Flat-Field files")
else:
......@@ -673,7 +675,7 @@ class Chip(FocalPlane):
# Add Read-out Noise
if config["ins_effects"]["add_readout"] == True:
seed = int(config["random_seeds"]["seed_readout"]) + pointing_ID*30 + self.chipID
seed = int(config["random_seeds"]["seed_readout"]) + pointing_ID*30 + self.chipID + 3
rng_readout = galsim.BaseDeviate(seed)
readout_noise = galsim.GaussianNoise(rng=rng_readout, sigma=self.read_noise)
FlatCombImg.addNoise(readout_noise)
......@@ -710,7 +712,7 @@ class Chip(FocalPlane):
del flat_img
# Export Dark current images
if config["output_setting"]["dark_output"] == True and pointing_type=='CAL':
if config["ins_effects"]["add_dark"] == True and config["output_setting"]["dark_output"] == True and pointing_type=='CAL':
if self.logger is not None:
self.logger.info(" Output N frame Dark Current files")
else:
......@@ -795,7 +797,7 @@ class Chip(FocalPlane):
# Add Read-out Noise
if config["ins_effects"]["add_readout"] == True:
seed = int(config["random_seeds"]["seed_readout"]) + pointing_ID*30 + self.chipID
seed = int(config["random_seeds"]["seed_readout"]) + pointing_ID*30 + self.chipID + 2
rng_readout = galsim.BaseDeviate(seed)
readout_noise = galsim.GaussianNoise(rng=rng_readout, sigma=self.read_noise)
DarkCombImg.addNoise(readout_noise)
......
......@@ -197,7 +197,7 @@ def MakeFlatSmooth(GSBounds, seed):
Flty, Fltx = np.mgrid[ymin:(ymax+1), xmin:(xmax+1)]
rg = Generator(PCG64(int(seed)))
p1,p2,bg=rg.poisson(1000, 3)
Fltz = 1e-6*(a1 * (Fltx-p1) ** 2 + a2 * (Flty-p2) ** 2 - a3*Fltx - a4*Flty) + bg*20
Fltz = 0.6*1e-7*(a1 * (Fltx-p1) ** 2 + a2 * (Flty-p2) ** 2 - a3*Fltx - a4*Flty) + bg*20
FlatImg = galsim.ImageF(Fltz)
return FlatImg
......
......@@ -3,7 +3,7 @@ import pylab as pl
import os
import numpy as np
from ObservationSim.Instrument._util import photonEnergy
from ObservationSim.Instrument._util import photonEnergy, calculateLimitMag
from ObservationSim.Instrument.FilterParam import FilterParam
try:
......@@ -13,7 +13,7 @@ except ImportError:
import importlib_resources as pkg_resources
class Filter(object):
def __init__(self, filter_id, filter_type, filter_param, ccd_bandpass):
def __init__(self, filter_id, filter_type, filter_param, ccd_bandpass=None):
self.filter_id = filter_id
self.filter_type = filter_type
self.ccd_bandpass = ccd_bandpass
......@@ -36,14 +36,15 @@ class Filter(object):
self.efficiency = filter_param.param[filter_type][4]
self.sky_background = filter_param.param[filter_type][5]
self.mag_saturation = filter_param.param[filter_type][6]
self.mag_dim = filter_param.param[filter_type][7]
self.mag_limiting = filter_param.param[filter_type][7]
# self.filter_dir = filter_param.filter_dir
def is_too_bright(self, mag):
return mag <= self.mag_saturation - 1.0
return mag <= self.mag_saturation - 2.5
# return mag <= 14.0
def is_too_dim(self, mag):
return mag >= self.mag_dim + 1.0
return mag >= self.mag_limiting + 1.0
def _get_bandpasses(self, filter_dir=None, unit='A'):
if self.filter_id < 7: # Photometric
......@@ -51,8 +52,10 @@ class Filter(object):
# filter_file = os.path.join(filter_dir, self.filter_type+".dat")
# bandpass_full = galsim.Bandpass(filter_file, wave_type=unit)
with pkg_resources.path('ObservationSim.Instrument.data.filters', self.filter_type.lower() + '.txt') as filter_file:
self.filter_bandpass = galsim.Bandpass(str(filter_file), wave_type=unit)
with pkg_resources.path('ObservationSim.Instrument.data.throughputs', self.filter_type.lower() + '_throughput.txt') as filter_file:
bandpass_full = galsim.Bandpass(str(filter_file), wave_type=unit)
bandpass_full = bandpass_full * self.ccd_bandpass
# bandpass_full = bandpass_full * self.ccd_bandpass
# Get sub-bandpasses
bandpass_sub_list = []
......@@ -95,3 +98,20 @@ class Filter(object):
def getSkyNoise(self, exptime, gain=1.):
return self.sky_background * exptime / gain
def update_limit_saturation_mags(self, exptime=150., psf_fwhm=0.1969, skyFn='sky_emiss_hubble_50_50_A.dat', chip=None):
if self.filter_type in ["GI", "GV", "GU"]:
return
if chip is not None:
pix_scale = chip.pix_scale
read_noise = chip.read_noise
dark_noise = chip.dark_noise
full_well = chip.full_well
else:
pix_scale = 0.074
read_noise = 5.0
dark_noise = 0.02
full_well = 90000
throughput_file = self.filter_type.lower() + '_throughput.txt'
self.mag_limiting, self.mag_saturation = calculateLimitMag(psf_fwhm=psf_fwhm, pixelSize=pix_scale, throughputFn=throughput_file, readout=5.0, skyFn=skyFn, darknoise=dark_noise, exTime=exptime, fw=full_well)
import numpy as np
import os
import math
from pylab import *
from scipy import interpolate
try:
import importlib.resources as pkg_resources
except ImportError:
# Try backported to PY<37 'importlib_resources'
import importlib_resources as pkg_resources
VC_A = 2.99792458e+18 # speed of light: A/s
VC_M = 2.99792458e+8 # speed of light: m/s
......@@ -15,4 +24,85 @@ def photonEnergy(lambd):
"""
nu = VC_A / lambd
eph = H_PLANK * nu
return eph
\ No newline at end of file
return eph
'''
description:
param {*} aperture: unit m, default 2 m
param {*} psf_fwhm: psf fwhm, default 0.1969"
param {*} pixelSize: pixel size, default 0.074"
param {*} pmRation: the ratio of souce flux in the limit mag calculation
param {*} throughputFn: throuput file name
param {*} readout: unit, e-/pixel
param {*} skyFn: sky sed file name, average of hst, 'sky_emiss_hubble_50_50_A.dat'
param {*} darknoise: unit, e-/pixel/s
param {*} exTime: exposure time one time, default 150s
param {*} exNum: exposure number, defautl 1
param {*} fw, full well value( or saturation value),default 90000e-/pixel
return {*} limit mag and saturation mag
'''
def calculateLimitMag(aperture = 2.0, psf_fwhm = 0.1969,pixelSize = 0.074, pmRation = 0.8, throughputFn = 'i_throughput.txt', readout = 5.0, skyFn= 'sky_emiss_hubble_50_50_A.dat', darknoise = 0.02,exTime = 150, exNum = 1, fw = 90000):
with pkg_resources.path('ObservationSim.Instrument.data.throughputs', throughputFn) as data_file:
throughput_f = np.loadtxt(data_file)
thr_i = interpolate.interp1d(throughput_f[:,0]/10, throughput_f[:,1]); # wavelength in anstrom
f_s = 200
f_e = 1100
delt_f = 0.5
data_num = int((f_e-f_s)/delt_f+1)
eff = np.zeros([data_num,2])
eff[:,0] = np.arange(f_s,f_e+delt_f,delt_f)
eff[:,1] = thr_i(eff[:,0])
wave = np.arange(f_s,f_e+delt_f,delt_f)
wavey = np.ones(wave.shape[0])
with pkg_resources.path('ObservationSim.Instrument.data.throughputs', skyFn) as data_file:
skydata = np.loadtxt(data_file)
skydatai = interpolate.interp1d(skydata[:,0]/10, skydata[:,1]*10)
sky_data = np.zeros([data_num,2])
sky_data[:,0] = np.arange(f_s,f_e+delt_f,delt_f)
sky_data[:,1] = skydatai(sky_data[:,0])
flux_sky = trapz((sky_data[:,1])*eff[:,1],sky_data[:,0])
skyPix = flux_sky*pixelSize*pixelSize*pi*(aperture*aperture/4)
###limit mag
r_pix = psf_fwhm*0.7618080243778568/pixelSize # radius RE80, pixel
cnum = math.pi * r_pix * r_pix
sn = 5
d = skyPix*exTime*exNum*cnum + darknoise*exTime*exNum*cnum+readout*readout*cnum*exNum
a=1
b=-sn*sn
c=-sn*sn*d
flux = (-b+sqrt(b*b-4*a*c))/(2*a)/pmRation
limitMag = -2.5*log10(flux/(54799275581.04437 * trapz(wavey*eff[:,1]/wave,wave, 0.1)*exTime*exNum*pi*(aperture/2)*(aperture/2)))
### saturation mag
from astropy.modeling.models import Gaussian2D
m_size = int(20 * psf_fwhm/pixelSize)
if m_size%2 == 0:
m_size + 1
m_cen = m_size//2
psf_sigma = psf_fwhm/2.355/pixelSize
gaussShape = Gaussian2D(1, m_cen, m_cen, psf_sigma, psf_sigma)
yp, xp = np.mgrid[0:m_size, 0:m_size]
psfMap = gaussShape(xp, yp)
maxRatio = np.amax(psfMap)/np.sum(psfMap)
# print(maxRatio)
flux_sat = fw/maxRatio*exNum
satMag = -2.5*log10(flux_sat/(54799275581.04437 * trapz(wavey*eff[:,1]/wave,wave, 0.1)*exTime*exNum*pi*(aperture/2)*(aperture/2)));
return limitMag , satMag
\ No newline at end of file
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 2.164489607366864 0.00015356245807983922 -3.436363301868159e-05 -1.870489414179214e-08 3.4169903432371594e-09 1.329160668259838e-08
DYDX_A_1 -0.01025662163204071 2.563555771056362e-07 -3.8339712168522614e-07 -3.0921572651851273e-12 -2.782385864095027e-12 -1.2927405756300694e-11
DYDX_C_1 -0.01025662163204071 2.563555771056362e-07 -3.8339712168522614e-07 -3.0921572651851273e-12 -2.782385864095027e-12 -1.2927405756300694e-11
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 6.575586074514935 0.00017715365529036883 0.0005455451137842477 -1.9613440745741114e-08 -9.227386593836169e-09 -4.188087036184667e-09
DYDX_A_1 0.0036275858789754415 -2.6482112732759975e-08 2.5593462628528386e-07 6.463563645069831e-12 4.03172098429654e-12 -3.917214235864082e-12
DYDX_D_1 0.0036275858789754415 -2.6482112732759975e-08 2.5593462628528386e-07 6.463563645069831e-12 4.03172098429654e-12 -3.917214235864082e-12
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 7.647178915824622 -0.00014153778353717477 0.0006585912409573279 1.1451647036969672e-08 -2.2503331458372405e-08 -5.97673441914924e-10
DYDX_A_1 -0.013388600612320525 3.4987613986258344e-07 -8.934574682539956e-07 -2.1629798251888717e-11 1.1573035017917812e-11 1.4777345392719905e-12
DYDX_E_1 -0.013388600612320525 3.4987613986258344e-07 -8.934574682539956e-07 -2.1629798251888717e-11 1.1573035017917812e-11 1.4777345392719905e-12
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 1.6274259827507076 -0.00034821339283356466 0.0002392999867887435 1.5635809977657976e-07 -7.514174027001749e-09 -6.566395011125117e-09
DYDX_A_1 -5.3689415286860876e-05 -1.912489940030657e-07 -1.070383333548475e-08 1.53386647062175e-10 -1.1208241918489809e-11 3.406912464353884e-12
DYDX_C_1 -5.3689415286860876e-05 -1.912489940030657e-07 -1.070383333548475e-08 1.53386647062175e-10 -1.1208241918489809e-11 3.406912464353884e-12
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 6.882799280484086 -0.00027753891131284954 0.0004922039820404395 3.082997123523641e-08 -9.49966186877231e-09 -2.3656818322711693e-09
DYDX_A_1 -0.011947813534498112 4.093696016714032e-08 -7.435107573317389e-07 2.5528541317977112e-12 3.192792142602198e-12 -2.453919520892182e-12
DYDX_D_1 -0.011947813534498112 4.093696016714032e-08 -7.435107573317389e-07 2.5528541317977112e-12 3.192792142602198e-12 -2.453919520892182e-12
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 7.677233822131253 -0.00048041060058740204 0.0004956385735024366 6.868585247565035e-08 -9.175237278696478e-09 1.2566962458208905e-09
DYDX_A_1 0.003983370254635055 -1.232787560255339e-08 2.1234388976109016e-07 1.6204618268328708e-11 3.983819645370279e-12 4.263520014579825e-12
DYDX_E_1 0.003983370254635055 -1.232787560255339e-08 2.1234388976109016e-07 1.6204618268328708e-11 3.983819645370279e-12 4.263520014579825e-12
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 4.4793311976875065 -0.0007086900045398478 0.00011182473491208784 4.7164973849785044e-08 3.838133586023918e-09 -4.20736855305813e-09
DYDX_A_1 -0.009955230104200801 5.494138645881217e-07 -5.71634189603669e-07 -2.919798057644714e-11 1.4502406606426133e-11 -2.075548579200935e-12
DYDX_C_1 -0.009955230104200801 5.494138645881217e-07 -5.71634189603669e-07 -2.919798057644714e-11 1.4502406606426133e-11 -2.075548579200935e-12
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 8.08810918775784 -0.0003160383656201733 0.00032117137940834755 1.7411054368514052e-08 1.661691957794701e-08 -7.331801211925892e-10
DYDX_A_1 0.004037692561048198 9.260581777483333e-08 2.0948104952770805e-07 -1.3666211810764903e-12 9.22151128823822e-12 3.56053004729388e-12
DYDX_D_1 0.004037692561048198 9.260581777483333e-08 2.0948104952770805e-07 -1.3666211810764903e-12 9.22151128823822e-12 3.56053004729388e-12
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 9.62422536352037 -0.0007513346376027576 0.00047559530073159164 5.269556788714742e-08 7.1730007979798225e-09 -6.677835198312419e-09
DYDX_A_1 -0.012614129322424207 3.0685483155242454e-07 -8.080248472425367e-07 -1.675839114053055e-11 6.28724942761309e-12 1.830554524540624e-12
DYDX_E_1 -0.012614129322424207 3.0685483155242454e-07 -8.080248472425367e-07 -1.675839114053055e-11 6.28724942761309e-12 1.830554524540624e-12
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 2.077313161445304 0.000980949024127796 0.00021283436080014677 -2.6874752294266443e-07 1.2116296272703047e-08 -2.34247574816342e-08
DYDX_A_1 0.0006570356116067526 1.2290395976811375e-06 1.6637183470133416e-07 -3.0304924532261765e-10 2.4734040679617618e-11 -2.3590221649145147e-11
DYDX_C_1 0.0006570356116067526 1.2290395976811375e-06 1.6637183470133416e-07 -3.0304924532261765e-10 2.4734040679617618e-11 -2.3590221649145147e-11
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 6.774750256151258 4.707107703698734e-05 0.000503719215056276 -9.167623136460398e-09 -4.152231401897418e-08 -9.419809130154712e-09
DYDX_A_1 -0.011168343549873953 2.6666977679877337e-08 -7.470831119863737e-07 -6.286511915787003e-12 1.6439841503101933e-11 2.596573361763681e-12
DYDX_D_1 -0.011168343549873953 2.6666977679877337e-08 -7.470831119863737e-07 -6.286511915787003e-12 1.6439841503101933e-11 2.596573361763681e-12
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 7.575427899521311 -0.00021618386157363904 0.0005591063261388894 7.342842947533113e-09 -1.7485023350712322e-08 -1.0377783468068108e-08
DYDX_A_1 0.004683960947904331 -1.888624610879838e-08 3.2884821904527606e-07 1.018984346983241e-11 5.168946855257885e-12 -2.043053548121042e-12
DYDX_E_1 0.004683960947904331 -1.888624610879838e-08 3.2884821904527606e-07 1.018984346983241e-11 5.168946855257885e-12 -2.043053548121042e-12
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 -0.6190375093057178 -0.000819084818469411 0.00028964716536233805 6.270789289859524e-08 -1.420775464725658e-08 -9.328521975988917e-09
DYDX_A_1 0.008680162051601499 3.330054831581405e-07 -6.469221396130517e-07 -3.9523801242915675e-11 2.810706046076844e-11 9.755545191838492e-12
DYDX_C_1 0.008680162051601499 3.330054831581405e-07 -6.469221396130517e-07 -3.9523801242915675e-11 2.810706046076844e-11 9.755545191838492e-12
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 -7.508248370511439 -0.0006714401608233293 0.00017558009908350287 2.984240425469985e-08 4.3819705023343136e-08 -5.025346537840718e-09
DYDX_A_1 -0.009040738692611343 -2.842628508976022e-07 2.8610552097167497e-07 2.0072941233633973e-12 2.6743473726716594e-11 -1.990153449263359e-12
DYDX_D_1 -0.009040738692611343 -2.842628508976022e-07 2.8610552097167497e-07 2.0072941233633973e-12 2.6743473726716594e-11 -1.990153449263359e-12
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 -8.842745665545023 -0.0007610512902166516 0.0003383458198829188 5.974061158162743e-08 1.0142609417116612e-08 1.2101422641494325e-09
DYDX_A_1 0.015397941297630027 2.693607213384038e-08 -6.075147917008666e-07 -1.6037105086389434e-11 4.296881158063552e-12 -1.2228485054031964e-12
DYDX_E_1 0.015397941297630027 2.693607213384038e-08 -6.075147917008666e-07 -1.6037105086389434e-11 4.296881158063552e-12 -1.2228485054031964e-12
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 -3.644711332713124 0.0008001860385266981 9.479324761591071e-05 -1.743740644543708e-07 3.6478784815791542e-09 6.917592947848256e-09
DYDX_A_1 -0.005127657192091357 3.406797050005203e-07 1.6449903475316612e-07 -9.485982506821913e-11 -4.3771960897499225e-12 8.550685815444732e-12
DYDX_C_1 -0.005127657192091357 3.406797050005203e-07 1.6449903475316612e-07 -9.485982506821913e-11 -4.3771960897499225e-12 8.550685815444732e-12
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 -11.173576155920372 0.0007519533830363816 0.0004253768680462055 -1.5201878553469454e-07 2.0472547690216743e-08 -2.0569213743460413e-09
DYDX_A_1 0.014593603600807335 -2.5136860755841604e-07 -5.949998376910171e-07 3.678337259167903e-11 -3.0972180049312983e-12 1.6165162111383372e-12
DYDX_D_1 0.014593603600807335 -2.5136860755841604e-07 -5.949998376910171e-07 3.678337259167903e-11 -3.0972180049312983e-12 1.6165162111383372e-12
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 -12.213462520279169 0.00047910742870929717 0.0005408610935256049 -7.413930918915843e-08 -8.606042861984915e-09 -2.657692925463347e-09
DYDX_A_1 -0.011203612261385857 -1.0569751604742679e-07 4.877450459862202e-07 4.101880695762023e-12 -2.7701720429242062e-12 -1.1821036616778763e-12
DYDX_E_1 -0.011203612261385857 -1.0569751604742679e-07 4.877450459862202e-07 4.101880695762023e-12 -2.7701720429242062e-12 -1.1821036616778763e-12
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 -2.500141585167653 -1.969888743137498e-05 -3.719251228351035e-05 2.2450041893993265e-09 -4.776577101251428e-09 1.3199727484804396e-08
DYDX_A_1 0.009108519277662467 -3.0705408681783576e-07 -3.132719515155802e-07 6.422536264194293e-12 1.5326983931450917e-11 -5.645216688436237e-12
DYDX_C_1 0.009108519277662467 -3.0705408681783576e-07 -3.132719515155802e-07 6.422536264194293e-12 1.5326983931450917e-11 -5.645216688436237e-12
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 -9.389297829853636 -0.00015464197650568576 0.0002660281765192433 3.4852623322772082e-09 9.484803976320427e-09 7.336382512941422e-09
DYDX_A_1 -0.01112945128342416 -1.1311863974473163e-07 4.218220828671425e-07 -1.2516252053776076e-12 9.161770824233885e-12 -1.4981685450709086e-14
DYDX_D_1 -0.01112945128342416 -1.1311863974473163e-07 4.218220828671425e-07 -1.2516252053776076e-12 9.161770824233885e-12 -1.4981685450709086e-14
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 -12.07564081561785 0.0003538313487376174 0.0003424445292518675 -2.8281829213173136e-08 -1.9103125073139345e-09 1.3342745843474139e-08
DYDX_A_1 0.015623821782753402 -3.872409697306194e-07 -5.946762100158761e-07 1.4986070563264542e-11 8.421611722722356e-12 -3.1933488456130784e-12
DYDX_E_1 0.015623821782753402 -3.872409697306194e-07 -5.946762100158761e-07 1.4986070563264542e-11 8.421611722722356e-12 -3.1933488456130784e-12
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 -2.966407573122309 0.00017931467145883436 -1.1937327382141583e-05 -3.430114664968074e-08 -1.7104028303486308e-11 1.0768834553932357e-08
DYDX_A_1 -0.005803626340330835 -4.170068439771959e-08 1.290433938281288e-07 -2.8134994496798826e-11 3.815680617576105e-12 7.512242155559056e-12
DYDX_C_1 -0.005803626340330835 -4.170068439771959e-08 1.290433938281288e-07 -2.8134994496798826e-11 3.815680617576105e-12 7.512242155559056e-12
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 -10.924673575089688 0.00016185988743270996 0.00046683827051840587 8.136189930172963e-09 -1.1869040578509591e-08 -6.414416857587861e-10
DYDX_A_1 0.013421122504499828 -8.139117646528983e-08 -5.636862104195129e-07 -7.650480709282686e-12 8.277703707581925e-12 9.22249281275454e-13
DYDX_D_1 0.013421122504499828 -8.139117646528983e-08 -5.636862104195129e-07 -7.650480709282686e-12 8.277703707581925e-12 9.22249281275454e-13
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 -11.846585635638787 0.0002775660851037459 0.0005294313159274511 -2.2581643082700262e-08 -1.0333470137987452e-08 -6.219484318552529e-09
DYDX_A_1 -0.012336624365849553 -8.074439040178428e-08 5.451023075403868e-07 -5.4380660096969335e-12 -1.2614361480717028e-13 -4.742212399798437e-12
DYDX_E_1 -0.012336624365849553 -8.074439040178428e-08 5.451023075403868e-07 -5.4380660096969335e-12 -1.2614361480717028e-13 -4.742212399798437e-12
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 -0.7141848112333804 -5.04487513827462e-06 0.00015471935463847038 -7.014900817242317e-15 1.0929298687685976e-09 1.5741557084177702e-16
DYDX_A_1 0.0027492227533061912 3.5138528790228245e-09 -5.955850399858713e-07 3.427213002653244e-18 -7.613092613195848e-13 4.139822785657121e-18
DYDX_C_1 0.0027492227533061912 3.5138528790228245e-09 -5.955850399858713e-07 3.427213002653244e-18 -7.613092613195848e-13 4.139822785657121e-18
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 -2.106939125335775 2.910542304113313e-05 0.0004564427303190319 1.2607563885812768e-14 -6.305371040561855e-09 3.6839544062510705e-17
DYDX_A_1 -0.0008727377151777036 -3.574005433242036e-08 1.8906445736936065e-07 -5.341623280966443e-16 7.744222476838046e-12 -2.0367190878495254e-16
DYDX_D_1 -0.0008727377151777036 -3.574005433242036e-08 1.8906445736936065e-07 -5.341623280966443e-16 7.744222476838046e-12 -2.0367190878495254e-16
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 -2.20514006896569 2.9051997594102368e-05 0.00047771653989605765 -1.912692705609593e-14 -6.293715169166762e-09 3.935667733125835e-16
DYDX_A_1 0.003698183554891061 -1.9034332412054844e-08 -8.011647070145565e-07 2.414951487944578e-18 4.123548306803602e-12 -2.1651713505639886e-16
DYDX_E_1 0.003698183554891061 -1.9034332412054844e-08 -8.011647070145565e-07 2.414951487944578e-18 4.123548306803602e-12 -2.1651713505639886e-16
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 -0.8315346150463981 5.0198529393279955e-05 0.0001801418146367924 -7.973220526527133e-16 -1.0874898224312304e-08 -4.649475516861549e-17
DYDX_A_1 -0.0004831850282262942 4.4703024254268985e-09 1.0467587318097426e-07 -6.245290748577401e-16 -9.67808789638995e-13 1.8675680517829847e-20
DYDX_C_1 -0.0004831850282262942 4.4703024254268985e-09 1.0467587318097426e-07 -6.245290748577401e-16 -9.67808789638995e-13 1.8675680517829847e-20
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 -1.9194976847857337 5.2522649333701604e-05 0.00041583572415658347 -7.945377957980844e-16 -1.1378389323146788e-08 -9.30553377012502e-16
DYDX_A_1 0.0035512682123718664 -1.335162450569774e-08 -7.693387103306084e-07 4.782557131456633e-17 2.8923723305608908e-12 -3.557167801553638e-18
DYDX_D_1 0.0035512682123718664 -1.335162450569774e-08 -7.693387103306084e-07 4.782557131456633e-17 2.8923723305608908e-12 -3.557167801553638e-18
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 -2.0905850693944563 5.4359066390605035e-05 0.00045289971366087875 -4.304782162448096e-15 -1.1776224473350576e-08 -2.4120023848357506e-16
DYDX_A_1 -0.0011960850677701557 -2.5552822787103083e-08 2.5911619508272597e-07 2.7377051875450244e-17 5.5356793066910265e-12 1.4408483631640674e-16
DYDX_E_1 -0.0011960850677701557 -2.5552822787103083e-08 2.5911619508272597e-07 2.7377051875450244e-17 5.5356793066910265e-12 1.4408483631640674e-16
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 0.06577626420976657 0.00023843802359241968 0.00020214103397281637 -1.7123645168761916e-08 -5.1151994757772025e-09 -2.8149430186232906e-09
DYDX_A_1 -0.0023512307660126697 -3.3161090069914584e-07 -6.540476932452965e-07 2.7684183450126828e-11 2.2119467452457955e-13 5.7966394781263606e-12
DYDX_C_1 -0.0023512307660126697 -3.3161090069914584e-07 -6.540476932452965e-07 2.7684183450126828e-11 2.2119467452457955e-13 5.7966394781263606e-12
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 2.948513782669366 -0.00023026015901126757 0.0004966141941227662 1.7402268960629477e-08 -1.4703354511641052e-08 -9.053112415355464e-10
DYDX_A_1 0.001324315465861688 -5.3280510137879357e-08 2.1294144146014126e-07 7.149648535223347e-12 5.9124013181393895e-12 -1.569213924160992e-12
DYDX_D_1 0.001324315465861688 -5.3280510137879357e-08 2.1294144146014126e-07 7.149648535223347e-12 5.9124013181393895e-12 -1.569213924160992e-12
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 4.507912700810403 -0.0006565069814848197 0.0004717757492079797 4.615661132301661e-08 -9.929671168647712e-09 1.9253230332400385e-09
DYDX_A_1 -0.005418404321822283 3.4159713936048874e-07 -7.978348106960707e-07 -2.2179498116536742e-11 3.668089343194087e-12 -8.716971808473679e-13
DYDX_E_1 -0.005418404321822283 3.4159713936048874e-07 -7.978348106960707e-07 -2.2179498116536742e-11 3.668089343194087e-12 -8.716971808473679e-13
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 1.143028004919987 -0.00043165022047830434 6.196137733147702e-05 8.16457174098753e-08 5.016787588312008e-08 -1.1076947674988989e-08
DYDX_A_1 0.0009685847548946574 -6.769648548844193e-07 -1.3599935590555458e-07 1.3832682960654626e-10 8.096919396546198e-11 -7.115087004534495e-13
DYDX_C_1 0.0009685847548946574 -6.769648548844193e-07 -1.3599935590555458e-07 1.3832682960654626e-10 8.096919396546198e-11 -7.115087004534495e-13
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 2.1537852011622283 7.465469287286658e-05 0.0004351844939178058 -2.2198461139576395e-08 -1.3877608195218995e-08 -1.7628688846255955e-09
DYDX_A_1 -0.004230879607296237 8.498485744953868e-08 -7.501665624166511e-07 -1.6084245955031634e-11 4.759329258447093e-12 -4.056797888343e-12
DYDX_D_1 -0.004230879607296237 8.498485744953868e-08 -7.501665624166511e-07 -1.6084245955031634e-11 4.759329258447093e-12 -4.056797888343e-12
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 2.351548209319865 -3.689671315203568e-05 0.0005163556990925829 2.1158061718584205e-09 -3.490722309938645e-09 -1.528540044064975e-08
DYDX_A_1 0.001430019761307312 -7.985386958466852e-08 2.6731184353623225e-07 2.5955313438507735e-11 9.598310234511398e-12 -4.21444171834932e-12
DYDX_E_1 0.001430019761307312 -7.985386958466852e-08 2.6731184353623225e-07 2.5955313438507735e-11 9.598310234511398e-12 -4.21444171834932e-12
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 -1.3745251280636102 -0.0004166620793305387 0.00030781991744431526 3.5625065790500023e-08 -1.015616705292654e-08 -6.809703219697665e-09
DYDX_A_1 0.005259942743965531 2.2710135102429772e-07 -4.832866701253246e-07 -2.9893769156851795e-11 1.539093571694599e-11 2.3835803634126165e-12
DYDX_C_1 0.005259942743965531 2.2710135102429772e-07 -4.832866701253246e-07 -2.9893769156851795e-11 1.539093571694599e-11 2.3835803634126165e-12
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 -3.7902089554161935 -0.0005938780884699344 0.0004094352465421359 3.528558369624729e-08 8.932646120211718e-09 -4.700678524711011e-09
DYDX_A_1 -0.005334782127730197 -3.4904378900281923e-07 3.8534743707073547e-07 1.4929393517554934e-11 1.3055894861406129e-11 -2.410976643143283e-13
DYDX_D_1 -0.005334782127730197 -3.4904378900281923e-07 3.8534743707073547e-07 1.4929393517554934e-11 1.3055894861406129e-11 -2.410976643143283e-13
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 -5.5518511762976965 -0.0002398046719970402 0.00045376018467024545 1.2301023991565204e-08 7.2902255958184095e-09 -4.102819822051389e-09
DYDX_A_1 0.008329905249142448 -1.8413918879925165e-08 -5.436656649381185e-07 -2.6646238487129985e-12 -3.709762742803416e-14 -7.605203781010001e-13
DYDX_E_1 0.008329905249142448 -1.8413918879925165e-08 -5.436656649381185e-07 -2.6646238487129985e-12 -3.709762742803416e-14 -7.605203781010001e-13
#
# X and Y Offsets
#
......
......@@ -62,7 +62,7 @@ MMAG_MARK_C 30
#
DYDX_ORDER_C 1
DYDX_C_0 -2.7354339264200784 0.0003884059225995992 0.0002934336920997177 -6.577376769890092e-08 -6.359223200064821e-09 -1.1097280973256058e-08
DYDX_A_1 -0.004641001345987969 3.511388837177305e-08 3.9607543558818476e-07 -1.6972226774094907e-11 1.3488867882599842e-12 -8.489876295667006e-12
DYDX_C_1 -0.004641001345987969 3.511388837177305e-08 3.9607543558818476e-07 -1.6972226774094907e-11 1.3488867882599842e-12 -8.489876295667006e-12
#
# X and Y Offsets
#
......@@ -88,7 +88,7 @@ MMAG_MARK_D 30
#
DYDX_ORDER_D 1
DYDX_D_0 -10147.787891979067 0.0019216086870033513 0.003215323811924493 -4.8063860993686784e-08 -2.6100492634991815e-07 2.073557935126183e-08
DYDX_A_1 0.0025980099855243783 -3.6564971863746175e-08 -5.62827615916848e-07 -3.892025626012531e-16 7.92187197670973e-12 -1.1568305471507826e-17
DYDX_D_1 0.0025980099855243783 -3.6564971863746175e-08 -5.62827615916848e-07 -3.892025626012531e-16 7.92187197670973e-12 -1.1568305471507826e-17
#
# X and Y Offsets
#
......@@ -114,7 +114,7 @@ MMAG_MARK_E 30
#
DYDX_ORDER_E 1
DYDX_E_0 -6.942966088608769 0.0004659127224428531 0.0005755856461390132 -7.371873652226161e-08 -1.3592620859759395e-08 -9.169555746309921e-09
DYDX_A_1 -0.007339582235743328 1.8302351373519434e-08 5.31222949045451e-07 -1.2044608477578304e-11 -8.652820126572178e-13 -2.3783727378966497e-12
DYDX_E_1 -0.007339582235743328 1.8302351373519434e-08 5.31222949045451e-07 -1.2044608477578304e-11 -8.652820126572178e-13 -2.3783727378966497e-12
#
# X and Y Offsets
#
......
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