Skip to content

Commit

Permalink
Apply Anand's absolute mag calibration for Suprime
Browse files Browse the repository at this point in the history
  • Loading branch information
dstndstn committed Oct 24, 2023
1 parent 505bb6f commit 78e0eda
Showing 1 changed file with 9 additions and 59 deletions.
68 changes: 9 additions & 59 deletions py/legacypipe/suprime.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,73 +152,23 @@ def colorterm_ps1_to_observed(self, cat, band):
gi = gmag - imag
colorterm = np.zeros(len(gmag))

# From Arjun
coeffs = {
'I-A-L427': [-0.7496, 0.8574,-0.1317],
'I-A-L464': [-0.2358, 1.0048,-1.4035, 0.7257,-0.1200],
'I-A-L484': [ 0.2545,-0.6517, 0.4007,-0.0664],
'I-A-L505': [ 0.2422,-1.1041, 1.4401,-0.6947, 0.1103],
'I-A-L527': [ 0.2007,-0.1745,-0.0020],
}[band]
# From Anand's DESI spectro-photometric absolute calibration
coeffs[0] += {
'I-A-L427': 0.68191557,
'I-A-L464': 0.0139201 ,
'I-A-L484': -0.05529797,
'I-A-L505': -0.09449484,
'I-A-L527': -0.28457394,
}[band]

'''
coeffs = {
('I-A-L427', 'det0'): [-0.28424705, 0.82685339, -0.11524449],
('I-A-L427', 'det1'): [-0.75325532, 0.85490214, -0.12558040],
('I-A-L427', 'det2'): [-0.75637723, 0.79008085, -0.10552436],
('I-A-L427', 'det3'): [-0.78159808, 0.80512430, -0.11295731],
('I-A-L427', 'det4'): [-0.71297356, 0.79428127, -0.10296920],
('I-A-L427', 'det5'): [-0.84320759, 0.87572098, -0.13101296],
('I-A-L427', 'det6'): [-0.68329719, 0.78425943, -0.09968866],
('I-A-L427', 'det7'): [-0.82159570, 0.89193908, -0.13738897],
('I-A-L427', 'det8'): [-0.68616224, 0.83322286, -0.12044040],
('I-A-L427', 'det9'): [-0.74135645, 0.85037165, -0.12584055],
('I-A-L464', 'det0'): [ 0.16721592, 1.0240256, -1.4248714, 0.73881510, -0.12151509],
('I-A-L464', 'det1'): [-0.25788172, 1.0796685, -1.4960659, 0.77449375, -0.12874674],
('I-A-L464', 'det2'): [-0.19818093, 0.77259546, -1.1509697, 0.61700267, -0.10377371],
('I-A-L464', 'det3'): [-0.23667510, 0.81385095, -1.1822467, 0.62427989, -0.10394285],
('I-A-L464', 'det4'): [-0.28498758, 1.1403747, -1.6122600, 0.85914350, -0.14853811],
('I-A-L464', 'det5'): [-0.28369011, 1.0125591, -1.4419947, 0.75356121, -0.12527917],
('I-A-L464', 'det6'): [-0.16343730, 0.85664462, -1.2338599, 0.64654038, -0.10641947],
('I-A-L464', 'det7'): [-0.31020500, 1.1510306, -1.5828711, 0.81760253, -0.13634334],
('I-A-L464', 'det8'): [-0.14667440, 0.82502549, -1.1378496, 0.57465170, -0.09050647],
('I-A-L464', 'det9'): [-0.22115253, 0.96904387, -1.3394605, 0.68545881, -0.11148692],
('I-A-L484', 'det0'): [0.56623436, -0.46684735, 0.28723995, -0.042132945],
('I-A-L484', 'det1'): [0.31068532, -0.79086707, 0.49918099, -0.087169289],
('I-A-L484', 'det2'): [0.22405387, -0.69220742, 0.44491582, -0.077782046],
('I-A-L484', 'det3'): [0.22615498, -0.70722840, 0.44299891, -0.075952822],
('I-A-L484', 'det4'): [0.17879048, -0.54449126, 0.34089165, -0.054861936],
('I-A-L484', 'det5'): [0.20155096, -0.71276788, 0.45891697, -0.080426247],
('I-A-L484', 'det6'): [0.16120666, -0.40949649, 0.24023223, -0.031625251],
('I-A-L484', 'det7'): [0.11763535, -0.46142051, 0.28414022, -0.042724078],
('I-A-L484', 'det8'): [0.18347510, -0.36264566, 0.20113764, -0.022468228],
('I-A-L484', 'det9'): [0.17453148, -0.46639761, 0.27986103, -0.039640822],
('I-A-L505', 'det0'): [ 0.50373080, -0.8559560, 1.2598590, -0.64413976, 0.10739586],
('I-A-L505', 'det1'): [ 0.32277551, -1.4659562, 1.9486049, -0.98047265, 0.16476331],
('I-A-L505', 'det2'): [ 0.17912342, -1.0843317, 1.4304244, -0.69948633, 0.11379497],
('I-A-L505', 'det3'): [ 0.11757860, -0.8626978, 1.1161089, -0.52100995, 0.07913526],
('I-A-L505', 'det4'): [ 0.27868774, -1.3850005, 1.7415611, -0.81373014, 0.12612835],
('I-A-L505', 'det5'): [ 0.04673695, -0.6334728, 0.8515035, -0.40652864, 0.06270727],
('I-A-L505', 'det6'): [ 0.18423355, -0.9538490, 1.3373032, -0.66530996, 0.10797023],
('I-A-L505', 'det7'): [ 0.12444852, -0.8564716, 1.1346299, -0.53790123, 0.08276072],
('I-A-L505', 'det8'): [ 0.21130280, -0.9415645, 1.3139283, -0.65251298, 0.10571869],
('I-A-L505', 'det9'): [ 0.10681874, -0.6856443, 0.9489984, -0.45276313, 0.06946127],
('I-A-L527', 'det0'): [ 0.53620829, -0.12187766, -0.014672495],
('I-A-L527', 'det1'): [ 0.17815916, -0.16554206, -0.001510648],
('I-A-L527', 'det2'): [ 0.10282139, -0.09439950, -0.020957809],
('I-A-L527', 'det3'): [ 0.09833594, -0.10809471, -0.019701545],
('I-A-L527', 'det4'): [ 0.12965203, -0.10689139, -0.020319229],
('I-A-L527', 'det5'): [ 0.05744854, -0.07383463, -0.029106456],
('I-A-L527', 'det6'): [ 0.19910593, -0.15223658, -0.005140478],
('I-A-L527', 'det7'): [ 0.07660945, -0.07283587, -0.027140544],
('I-A-L527', 'det8'): [ 0.20662955, -0.12101095, -0.017464684],
('I-A-L527', 'det9'): [ 0.18526426, -0.15797659, -0.003059741],
}[band, self.ccdname]
'''
colorterm = np.zeros(len(gmag))
for power,coeff in enumerate(coeffs):
colorterm += coeff * gi**power
Expand Down

0 comments on commit 78e0eda

Please sign in to comment.