Unverified Commit 62ed0288 authored by Akke Viitanen's avatar Akke Viitanen
Browse files

add zou table

parent f849074d
Loading
Loading
Loading
Loading
Loading
+52 −0
Changes for data/from_zou/table2.csv: 52 added lines, 0 removed lines.
Original line number Diff line number Diff line
logm,low_3sigma,low_2sigma,low_1sigma,median,upp_1sigma,upp_2sigma,upp_3sigma
7.0,0.002,0.014,0.046,0.106,0.218,0.425,0.695
7.1,0.003,0.017,0.052,0.115,0.230,0.436,0.701
7.2,0.005,0.021,0.059,0.125,0.242,0.447,0.705
7.3,0.007,0.026,0.066,0.136,0.255,0.459,0.712
7.4,0.010,0.032,0.075,0.147,0.269,0.471,0.718
7.5,0.014,0.039,0.085,0.159,0.283,0.484,0.724
7.6,0.018,0.047,0.096,0.173,0.299,0.496,0.732
7.7,0.025,0.056,0.108,0.187,0.315,0.510,0.737
7.8,0.033,0.067,0.121,0.203,0.331,0.524,0.742
7.9,0.042,0.079,0.136,0.220,0.349,0.538,0.749
8.0,0.053,0.093,0.152,0.239,0.368,0.552,0.756
8.1,0.066,0.109,0.170,0.258,0.388,0.568,0.763
8.2,0.081,0.126,0.190,0.280,0.408,0.583,0.770
8.3,0.098,0.146,0.211,0.302,0.430,0.598,0.776
8.4,0.118,0.167,0.235,0.327,0.453,0.615,0.782
8.5,0.139,0.190,0.260,0.352,0.476,0.632,0.790
8.6,0.163,0.216,0.287,0.380,0.501,0.649,0.797
8.7,0.189,0.244,0.316,0.409,0.527,0.668,0.805
8.8,0.216,0.275,0.348,0.440,0.554,0.687,0.814
8.9,0.245,0.307,0.381,0.472,0.582,0.706,0.825
9.0,0.279,0.341,0.416,0.506,0.610,0.726,0.835
9.1,0.316,0.379,0.453,0.540,0.640,0.747,0.847
9.2,0.355,0.418,0.491,0.576,0.670,0.768,0.859
9.3,0.397,0.459,0.531,0.612,0.700,0.791,0.875
9.4,0.441,0.502,0.572,0.649,0.731,0.814,0.891
9.5,0.484,0.545,0.613,0.685,0.762,0.838,0.908
9.6,0.528,0.588,0.653,0.722,0.793,0.863,0.927
9.7,0.569,0.629,0.692,0.757,0.823,0.887,0.943
9.8,0.608,0.668,0.729,0.792,0.853,0.910,0.957
9.9,0.643,0.703,0.763,0.824,0.882,0.931,0.969
10.0,0.678,0.734,0.793,0.854,0.908,0.951,0.979
10.1,0.705,0.762,0.821,0.880,0.932,0.967,0.987
10.2,0.729,0.785,0.845,0.903,0.951,0.980,0.993
10.3,0.748,0.806,0.867,0.923,0.966,0.988,0.996
10.4,0.767,0.824,0.885,0.940,0.977,0.994,0.998
10.5,0.782,0.841,0.901,0.954,0.985,0.997,0.999
10.6,0.797,0.855,0.915,0.965,0.990,0.998,1.000
10.7,0.808,0.867,0.928,0.973,0.994,0.999,1.000
10.8,0.818,0.879,0.938,0.980,0.996,1.000,1.000
10.9,0.827,0.890,0.948,0.985,0.998,1.000,1.000
11.0,0.836,0.899,0.955,0.988,0.998,1.000,1.000
11.1,0.843,0.907,0.962,0.991,0.999,1.000,1.000
11.2,0.851,0.915,0.968,0.994,0.999,1.000,1.000
11.3,0.858,0.922,0.972,0.995,1.000,1.000,1.000
11.4,0.864,0.929,0.977,0.996,1.000,1.000,1.000
11.5,0.870,0.935,0.980,0.997,1.000,1.000,1.000
11.6,0.876,0.940,0.983,0.998,1.000,1.000,1.000
11.7,0.881,0.945,0.986,0.999,1.000,1.000,1.000
11.8,0.886,0.950,0.988,0.999,1.000,1.000,1.000
11.9,0.890,0.954,0.990,0.999,1.000,1.000,1.000
12.0,0.895,0.958,0.991,0.999,1.000,1.000,1.000
+3 −3
Changes for src/scripts/create_lsst_filters.py: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -18,13 +18,13 @@ import numpy as np
# NOTE: git clone 'https://github.com/lsst/throughputs.git'

if __name__ == "__main__":
    filenames = glob.glob("data/egg/share/filter-db/inaf/throughputs/baseline/hardware_*.fits")
    filenames = glob.glob("data/egg/share/filter-db/inaf/throughputs/baseline/hardware_*.dat")
    for filename_in in filenames:
        x, y = np.loadtxt(filename_in).T
        x *= u.nm.to(u.um)
        norm = np.trapz(y, x)
        norm = np.trapezoid(y, x)
        y /= norm
        assert np.isclose(np.trapz(y, x), 1.0)
        assert np.isclose(np.trapezoid(y, x), 1.0)

        filename_out = filename_in.replace(".dat", ".fits")
        fitsio.write(filename_out, {"LAM": np.array([x]), "RES": np.array([y])})