Skip to content

Commit d977207

Browse files
committed
Remove units keyword argument to read_filter
Also removed from library filter reading functions like `PhotometricFilters.2MASS_J()`. We are now always putting units in the filters so having this as an option doesn't really make sense.
1 parent 7f11897 commit d977207

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/library.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ const PYPHOT_DATADEP = DataDep(
88
"9078486ec989bc0ffddb60f9cda686dff887c5d69627bc4703fd41d78a9e7d46";
99
)
1010

11-
function read_filter(name::AbstractString, units=true)
11+
function read_filter(name::AbstractString)
1212
local wave, through, dtype, fname
1313
HDF5.h5open(datadep"filters/new_filters.hd5") do fh
1414
node = fh["filters/$name"]
1515
data = read(node)
1616
wave = map(i -> i.WAVELENGTH, data)
17-
if units
18-
unitstr = read(HDF5.attributes(node)["WAVELENGTH_UNIT"])
19-
wave *= parse_unit(unitstr)
20-
end
17+
unitstr = read(HDF5.attributes(node)["WAVELENGTH_UNIT"])
18+
wave *= parse_unit(unitstr)
2119
through = map(i -> i.THROUGHPUT, data)
2220
dtype = read(HDF5.attributes(node)["DETECTOR"])
2321
fname = read(HDF5.attributes(node)["NAME"])
@@ -313,5 +311,5 @@ const FILTER_NAMES = [
313311

314312
for filter_name in FILTER_NAMES
315313
F = Symbol(filter_name)
316-
@eval $F(; units=true) = read_filter($filter_name, units)
314+
@eval $F() = read_filter($filter_name)
317315
end

0 commit comments

Comments
 (0)