Closed karpov-sv closed 4 years ago
Thanks for reporting the bugs. Note that the effective wavelength issue only affects the base version of pyphot using pint units, it does not affect the astropy version.
Filter object information:
name: ZTF_r
detector type: photon
wavelength units: nanometer
central wavelength: 643.692086 nm
pivot wavelength: 642.116699 nm
effective wavelength: 633.959313 nm
photon wavelength: 637.097152 nm
minimum wavelength: 560.080000 nm
maximum wavelength: 731.660000 nm
norm: 14739.212505
effective width: 151.525747 nm
fullwidth half-max: 155.710000 nm
definition contains 3201 points
Zeropoints
Vega: 21.626994 mag,
2.2346125681876647e-09 erg / (Angstrom cm2 s),
3073.3318967140135 Jy
70286.39164596281 ph / (Angstrom cm2 s)
AB: 21.446018 mag,
2.639932202863843e-09 erg / (Angstrom cm2 s),
3630.7805477009956 Jy
ST: 21.100000 mag,
3.6307805477010028e-09 erg / (Angstrom cm2 s),
4993.524974339604 Jy
revision 55d7076 implements the ordering correction.
Units corrected in revision ba206e3.
The bug came from the wrong default library objects. Corrected for using the unit aware classes instead.
ZTF filter ascii file corrected in rev. 40e82c0
Correction of the libraries done. Version 1.1 -- rev. 943b2a5
Let me know if you still have issues
Yes, I confirm that now it works as expected. Thanks!
It seems ZTF filters are currently broken.
For ZTF_g, the problem is missing TAB between 'WAVELENGTH_UNIT' and 'nanometer' in ASCII file, which prevents correct reading of wavelength units.
For ZTF_i, the entries in ASCII file are in descending order, which breaks numerical integration. It may be either fixed on a file level, or more generically - in Filter class constructor like that:
Both of these errors are propagated to default new_filters.hd5 library.
ZTF_r loads correctly, but its effective wavelength is order of magnitude larger than it should be (which seems to be a generic problem for all filters defined with 'nanometer' units - at least for Gaia_MAW_G it is the same)