Skip to content

Commit

Permalink
Merge pull request #117 from karllark/enhance_ave
Browse files Browse the repository at this point in the history
Enhance extinction curve averaging
  • Loading branch information
karllark authored Feb 20, 2024
2 parents 8f5019f + 7144450 commit 4a71419
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion measure_extinction/extdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def AverageExtData(extdatas, min_number=3, mask=[]):
for extdata in extdatas:
# check the data type of the extinction curve, and convert if needed
# the average curve must be calculated from the A(lambda)/A(V) curves
if extdata.type != "alav" and extdata.type != "alax":
if extdata.type != "alav" and extdata.type != "alax" and extdata.type != "elvebv":
extdata.trans_elv_alav()

# collect the keywords of the data in the extinction curves, and collect the names of the BAND data in the extinction curves, and determine the wavelengths of the data
Expand Down Expand Up @@ -234,6 +234,7 @@ def AverageExtData(extdatas, min_number=3, mask=[]):

# calculate the average and uncertainties of the spectral extinction data
else:
exts = np.stack(exts, axis=0)
aveext.exts[src] = np.nanmean(exts, axis=0)
aveext.npts[src] = np.sum(~np.isnan(exts), axis=0)
aveext.stds[src] = np.nanstd(exts, axis=0, ddof=1)
Expand Down

0 comments on commit 4a71419

Please sign in to comment.