Commit 59a2dbaa authored by Médéric Boquien's avatar Médéric Boquien

Add GAZPAR filters.

parent 8fcc7f46
......@@ -5,6 +5,7 @@
- The stellar mass-weighted age is now provided. This is a much more usual measure of the age than the age of the oldest star. This is accessible with the `stellar.age_m_star` keyword in the `bc03` module with with the `stellar.age_mass` keyword in the `m2005` module. (Médéric Boquien)
- The nebular models have been expanded from log U=-3 to log U=-4. (Médéric Boquien & Akio Inoue)
- The nebular models are now sampled in steps of 0.1 dex in log U rather than 1.0 dex steps. (Médéric Boquien & Akio Inoue)
- A new set of filters from GAZPAR has been added. The pattern of the filter name is "telescope.instrument.filter", e.g. "hst.wfc3.F160W". If the telescope has one instrument, it is skipped, e.g. "galex.FUV". For now the original set of filters is still provided. (Médéric Boquien & Olivier Ilbert)
### Changed
- We do not output the break strength from the `bc03` module anymore as these were not computed properly. (Médéric Boquien)
......
......@@ -171,6 +171,44 @@ def build_filters(base):
base.add_filters(filters)
def build_filters_gazpar(base):
filters = []
filters_dir = os.path.join(os.path.dirname(__file__), 'filters_gazpar/')
for filter_file in glob.glob(filters_dir + '**/*.pb', recursive=True):
with open(filter_file, 'r') as filter_file_read:
_ = filter_file_read.readline() # We use the filename for the name
filter_type = filter_file_read.readline().strip('# \n\t')
_ = filter_file_read.readline() # We do not yet use the calib type
filter_desc = filter_file_read.readline().strip('# \n\t')
filter_name = filter_file.replace(filters_dir, '')[:-3]
filter_name = filter_name.replace('/', '.')
filter_table = np.genfromtxt(filter_file)
# The table is transposed to have table[0] containing the wavelength
# and table[1] containing the transmission.
filter_table = filter_table.transpose()
# We convert the wavelength from Å to nm.
filter_table[0] *= 0.1
print("Importing %s... (%s points)" % (filter_name,
filter_table.shape[1]))
new_filter = Filter(filter_name, filter_desc, filter_type,
filter_table)
# We normalise the filter and compute the effective wavelength.
# If the filter is a pseudo-filter used to compute line fluxes, it
# should not be normalised.
if not filter_name.startswith('PSEUDO'):
new_filter.normalise()
else:
new_filter.effective_wavelength = np.mean(
filter_table[0][filter_table[1] > 0]
)
filters.append(new_filter)
base.add_filters(filters)
def build_m2005(base):
m2005_dir = os.path.join(os.path.dirname(__file__), 'maraston2005/')
......@@ -697,6 +735,7 @@ def build_base():
print('#' * 78)
print("1- Importing filters...\n")
build_filters(base)
build_filters_gazpar(base)
print("\nDONE\n")
print('#' * 78)
......
macro read plot.sm
plot
macro read plot.sm
plot
!ls -alrt
!more J.pb
macro read plot.sm
plot
# H_2mass
# photon
# calib 0
# 2MASS H-BAND TOTAL RESPONSE
14180 0.0000
14400 0.0005
14620 0.0028
14780 0.0081
14860 0.0287
14930 0.0871
15040 0.2014
15150 0.4382
15280 0.6864
15390 0.8181
15460 0.8821
15510 0.9118
15560 0.9269
15650 0.9293
15720 0.8727
15770 0.8566
15830 0.8826
15920 0.9181
15970 0.9267
16020 0.9076
16130 0.9260
16190 0.9205
16280 0.9242
16330 0.9235
16420 0.9418
16480 0.9491
16570 0.9807
16590 0.9937
16710 1.0000
16840 0.9561
17010 0.9241
17150 0.9821
17270 0.9916
17390 0.9887
17460 0.9792
17510 0.9682
17530 0.9370
17560 0.9190
17640 0.8423
17750 0.6671
17850 0.2694
17900 0.4516
17960 0.1731
18030 0.1077
18100 0.0707
18130 0.0051
18180 0.0200
18280 0.0004
18350 0.0000
18500 0.0001
18710 0.0000
# J_2mass
# photon
# calib 0
# 2MASS J-BAND TOTAL RESPONSE
10620 0.0000
10660 0.0004
10700 0.0015
10750 0.0027
10780 0.0055
10820 0.0123
10840 0.0203
10870 0.0306
10890 0.0405
10930 0.0515
10960 0.0564
11020 0.0718
11050 0.2736
11070 0.3410
11090 0.3584
11120 0.3801
11160 0.3307
11170 0.2395
11200 0.2501
11230 0.2833
11280 0.2582
11290 0.2515
11320 0.5381
11340 0.2232
11380 0.5369
11400 0.1102
11430 0.5292
11470 0.2619
11540 0.3202
11590 0.1743
11640 0.6070
11670 0.6179
11700 0.6763
11730 0.7279
11750 0.7465
11790 0.8304
11820 0.7903
11860 0.8096
11880 0.8369
11920 0.8360
11950 0.7499
11990 0.7080
12020 0.6988
12090 0.7049
12160 0.7004
12210 0.7328
12270 0.7057
12310 0.8424
12360 0.9219
12400 0.9525
12440 0.9676
12470 0.9595
12530 0.9227
12550 0.8930
12580 0.8529
12600 0.8023
12650 0.7501
12700 0.6781
12750 0.6524
12790 0.6388
12860 0.6424
12920 0.6486
12970 0.6824
13020 0.7529
13050 0.7759
13070 0.8118
13100 0.7770
13130 0.7210
13160 0.9525
13190 0.8551
13230 0.8414
13260 1.0000
13300 0.8947
13330 0.8549
13340 0.5379
13360 0.2799
13390 0.9065
13430 0.6893
13460 0.5533
13490 0.2432
13530 0.0144
13550 0.0002
13600 0.0401
13630 0.0045
13700 0.0003
13730 0.0372
13770 0.0005
13830 0.0000
13880 0.0001
13920 0.0033
13950 0.0003
13960 0.0085
13970 0.0254
13980 0.1184
14000 0.0001
14010 0.0001
14020 0.0521
14040 0.0104
14060 0.0478
14070 0.0004
14100 0.0024
14120 0.0053
14160 0.0086
14210 0.0007
14260 0.0003
14420 0.0004
14500 0.0000
# Ks_2mass
# photon
# calib 0
# 2MASS K-BAND TOTAL RESPONSE
19000 0.0000
19150 0.0000
19270 0.0000
19340 0.0002
19390 0.0005
19480 0.0054
19570 0.0119
19620 0.0197
19690 0.0422
19760 0.0873
19810 0.1528
19890 0.2482
19900 0.1902
19980 0.2339
20080 0.2946
20140 0.3982
20190 0.3366
20280 0.6207
20370 0.7650
20450 0.7464
20610 0.6251
20720 0.7255
20750 0.6895
20820 0.7879
20890 0.8181
20990 0.8228
21060 0.8633
21130 0.8778
21200 0.8549
21240 0.8953
21380 0.9189
21450 0.9268
21550 0.9267
21690 0.9009
21760 0.9228
21850 0.8428
21970 0.9459
22080 0.9804
22130 0.9879
22180 0.9848
22320 0.9647
22370 0.9816
22480 0.9834
22560 0.9613
22600 0.9792
22630 1.0000
22650 0.9632
22700 0.9812
22720 0.9681
22760 0.9109
22770 0.9821
22810 0.8896
22840 0.8918
22860 0.9424
22910 0.8404
22930 0.8042
22950 0.7077
22970 0.6576
22990 0.5607
23060 0.4437
23110 0.3482
23160 0.2302
23200 0.1626
23250 0.1360
23280 0.0921
23350 0.0624
23390 0.0431
23440 0.0340
23460 0.0310
23520 0.0118
23610 0.0068
23630 0.0007
23700 0.0030
23750 0.0021
23840 0.0004
23990 0.0000
macro read plot.sm
plot_megacam
macro read plot.sm
plot_wircam
# MCam_g
# photon
# calib 0
# g from Megacam, scanning of the filters at the telescope, MegaCam_Filters_data.txt*QE*M1*Opt*Atmosphere airmass 1.2
3720 0.00000
3740 0.00044
3780 0.00103
3820 0.00179
3860 0.00268
3900 0.00395
3940 0.00585
3980 0.00901
4020 0.01643
4060 0.04320
4100 0.13930
4140 0.35461
4180 0.60664
4220 0.74267
4260 0.77664
4300 0.80452
4340 0.82527
4380 0.83332
4420 0.85681
4460 0.88600
4500 0.90304
4540 0.91365
4580 0.93987
4620 0.96083
4660 0.96055
4700 0.95255
4740 0.95751
4780 0.97772
4820 0.99501
4860 0.99929
4900 1.00000
4940 0.99483
4980 0.96468
5020 0.92882
5060 0.91689
5100 0.90536
5140 0.87966
5180 0.86041
5220 0.86696
5260 0.88922
5300 0.88381
5340 0.85949
5380 0.86108
5420 0.85419
5460 0.78666
5500 0.69516
5540 0.62975
5580 0.54653
5620 0.40361
5660 0.23530
5700 0.10695
5740 0.04041
5780 0.01377
5820 0.00463
5860 0.00175
5900 0.00104
5940 0.00096
5980 0.00087
6020 0.00060
6060 0.00027
6100 0.00000
# MCam_inew
# photon
# calib 0
# new i-band from Megacam, scanning of the filters at the telescope, MegaCam_Filters_data.txt*QE*M1*Opt*Atmosphere airmass 1.2
6680 0.00000
6720 0.03194
6760 0.10012
6800 0.25029
6840 0.56207
6880 0.81588
6920 0.94781
6960 0.98853
7000 1.00000
7040 0.99871
7080 0.99227
7120 0.98390
7160 0.94220
7200 0.91489
7240 0.92260
7280 0.91780
7320 0.92638
7360 0.92935
7400 0.91618
7440 0.90221
7480 0.88489
7520 0.86753
7560 0.85839
7600 0.55755
7640 0.57991
7680 0.81682
7720 0.79948
7760 0.78403
7800 0.76779
7840 0.75324
7880 0.74060
7920 0.72843
7960 0.71708
8000 0.70526
8040 0.69232
8080 0.67865
8120 0.65064
8160 0.62014
8200 0.60349
8240 0.58977
8280 0.57339
8320 0.56243
8360 0.55601
8400 0.51006
8440 0.33080
8480 0.13155
8520 0.05168
8560 0.02129
8600 0.00850
8640 0.00549
8680 0.00246
8720 0.00000
# MCam_i
# photon
# calib 0
# old i-band from Megacam, scanning of the filters at the telescope, MegaCam_Filters_data.txt*QE*M1*Opt*Atmosphere airmass 1.2
6580 0.00000
6600 0.00185
6640 0.00290
6680 0.00462
6720 0.00751
6760 0.01270
6800 0.02207
6840 0.03862
6880 0.06812
6920 0.13003
6960 0.24212
7000 0.41407
7040 0.62309
7080 0.82548
7120 0.96829
7160 0.99910
7200 0.99219
7240 1.00000
7280 0.98795
7320 0.99161
7360 0.99725
7400 0.98757
7440 0.97753
7480 0.96627
7520 0.95060
7560 0.93176
7600 0.59812
7640 0.61979
7680 0.87811
7720 0.86733
7760 0.85937
7800 0.85331
7840 0.84703
7880 0.83761
7920 0.82321
7960 0.80434
8000 0.78194
8040 0.76376
8080 0.74829
8120 0.72122
8160 0.69449
8200 0.67610
8240 0.64854
8280 0.60836
8320 0.57517
8360 0.55490
8400 0.51881
8440 0.47725
8480 0.42294
8520 0.33985
8560 0.24156
8600 0.15021
8640 0.08254
8680 0.04048
8720 0.02027
8760 0.01248
8800 0.00722
8840 0.00454
8880 0.00208
8920 0.00168
8960 0.00175
9000 0.00167
9040 0.00174
9080 0.00135
9120 0.00000
# MCam_r
# photon
# calib 0
# r from Megacam, scanning of the filters at the telescope, MegaCam_Filters_data.txt*QE*M1*Opt*Atmosphere airmass 1.2
5100 0.00000
5120 0.00225
5160 0.00207
5200 0.00203
5240 0.00223
5280 0.00270
5320 0.00362
5360 0.00526
5400 0.00841
5440 0.01507
5480 0.02987
5520 0.06120
5560 0.12100
5600 0.22052
5640 0.36391
5680 0.53848
5720 0.70173
5760 0.80060
5800 0.82002
5840 0.80200
5880 0.79426
5920 0.80727
5960 0.82226
6000 0.83322
6040 0.85404
6080 0.88771
6120 0.92339
6160 0.94828
6200 0.96201
6240 0.97418
6280 0.98843
6320 0.99790
6360 1.00000
6400 0.99510
6440 0.98310
6480 0.96813
6520 0.94781
6560 0.91159
6600 0.85365
6640 0.77950
6680 0.70966
6720 0.67147
6760 0.68310
6800 0.73786
6840 0.71950
6880 0.50930
6920 0.24942
6960 0.08076
7000 0.02394
7040 0.00893
7080 0.00390
7120 0.00191
7160 0.00102
7200 0.00061
7220 0.00000
# MCam_u
# photon
# calib 0
# u from Megacam, scanning of the filters at the telescope, MegaCam_Filters_data.txt*QE*M1*Opt*Atmosphere airmass 1.2
3000 0.00000
3180 0.00014
3220 0.00077
3260 0.00339
3300 0.02583
3340 0.10930
3380 0.23658
3420 0.32041
3460 0.37811
3500 0.46369
3540 0.52407
3580 0.54900
3620 0.57219
3660 0.60676
3700 0.58505
3740 0.55544
3780 0.60457
3820 0.73291
3860 0.84604
3900 0.86817
3940 0.89752
3980 0.97058
4020 1.00000
4060 0.92392
4100 0.67840
4140 0.34345
4180 0.12264
4220 0.04185
4260 0.01688
4300 0.00819
4340 0.00479
4380 0.00326
4420 0.00248
4460 0.00204
4500 0.00180
4540 0.00158
4580 0.00141
4620 0.00134
4660 0.00141
4700 0.00156
4740 0.00187
4780 0.00236
4820 0.00313
4860 0.00466
4900 0.00750
4940 0.01318
4980 0.02186
5020 0.02762
5060 0.02611
5100 0.02105
5140 0.01572
5180 0.01031
5220 0.00580
5260 0.00354
5300 0.00364
5340 0.00465
5380 0.00493
5420 0.00420
5460 0.00344
5500 0.00375
5540 0.00000
# MCam_z
# photon
# calib 0
# z 5 in photons (z from Megacam, scanning of the filters at the telescope, MegaCam_Filters_data.txt*QE*M1*Opt*Atmosphere airmass 1.2)
7780 0.00000
7800 0.00107
7840 0.00152
7880 0.00222
7920 0.00333
7960 0.00524
8000 0.00860
8040 0.01460
8080 0.02640
8120 0.04936
8160 0.09636
8200 0.19167
8240 0.36265
8280 0.59058
8320 0.80297
8360 0.95047
8400 1.00000
8440 0.99598
8480 0.97787
8520 0.96236
8560 0.94271
8600 0.91990
8640 0.89759
8680 0.87349
8720 0.84136
8760 0.80430
8800 0.77248
8840 0.74543
8880 0.71911
8920 0.67496
8960 0.61792
9000 0.58490
9040 0.56976
9080 0.54835
9120 0.52162
9160 0.49259
9200 0.46495
9240 0.43724
9280 0.38480
9320 0.31260
9360 0.26236
9400 0.26110
9440 0.24305
9480 0.22380
9520 0.21418
9560 0.20953
9600 0.21234
9640 0.21512
9680 0.21561
9720 0.20422
9760 0.18851
9800 0.17772
9840 0.16620
9880 0.15185
9920 0.13551
9960 0.11947
10000 0.10369
10040 0.08821
10080 0.07289
10120 0.05780