mfouesneau / pyphot

suite to deal with passband photometry
https://mfouesneau.github.io/pyphot/
MIT License
57 stars 18 forks source link

issue with filter profiles? #12

Closed stellaCL closed 6 years ago

stellaCL commented 6 years ago

Hi,

Can I ask how did you define the filters in Pyphot, because I noticed that at least some of them do not match with archival values?

I made a plot of a 20,000K blackbody and then plotted the transmission curves of you Ground_Johnson_V and HST_WFPC2_F555W with the corresponding filters from the SVO Filter Profile Service, and they do not match. Most importantly the f.transmit() for the Pyphot Ground Johnson V filter shows that the filter has a bandwidth of over 3000 Angstrom and it peaks around 3000 Angstrom.

I am attaching a copy of that plot

figure_1

mfouesneau commented 6 years ago

This is surprising because I checked against SVO quite recently.

if I just look at the description of the filter:

>>> lib['GROUND_JOHNSON_V'].info()
Filter object information:
    name:                 GROUND_JOHNSON_V
    detector type:        energy
    wavelength units:     AA
    central wavelength:   5504.666021 angstrom
    pivot wavelength:     5492.885092 angstrom
    effective wavelength: 5438.689405 angstrom
    norm:                 870.650149
    definition contains 10000 points

    Zeropoints
        Vega: 21.099109 mag,
              3.6337607043700736e-09 erg / angstrom * centimeter ** 2 * second,
              3657.0984273591766 Jy
          AB: 21.106951 mag,
              3.607610771896633e-09 erg / angstrom * centimeter ** 2 * second,
              3630.7805477010147 Jy
          ST: 21.100000 mag,
              3.6307805477010028e-09 erg / angstrom * centimeter ** 2 * second,
              3654.0991307201225 Jy

And if I simply plot the filter, I obtain something similar to your red curve:

>>> f = lib['GROUND_JOHNSON_V']
>>> plt.plot(f.wavelength.to('AA').magnitude, f.transmit)
screen shot 2018-05-29 at 17 38 06

Could it be that you plotted without the wavelength vector as x-values? It seems you'd find it starts at 0 and ends at 10 000.

mfouesneau commented 6 years ago

I guess I can close this issue then. Re-open it if needed.

jvines commented 5 years ago

Hi, I noticed that the transmission curve of GROUND_JOHNSON_B is incorrect... I get the following when plotting it:

trans

mfouesneau commented 5 years ago

Can you explain why this makes you think this is incorrect?

jvines commented 5 years ago

The y-axis. The transmision should always be a number between 0 and 1

mfouesneau commented 5 years ago

Calculations are independent of the normalization of the filters. I suppose it is a percent transmission unit.

jvines commented 5 years ago

But from what I saw in your code, in the case of apply_transmision you multiply the transmision curve to the flux, so having the curve go to values such as 70 would make the flux stronger, unless I skipped the part where you ignore the fact that its values are > 1

EDIT: Also, why would only the B band be a percent unit and not the other Johnson filters