Skip to content

Commit 7c20f04

Browse files
committed
Minor updates
1 parent fa09326 commit 7c20f04

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

measure_extinction/extdata.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def _get_column_val(column):
9797
return float(column)
9898

9999

100-
def AverageExtData(extdatas, min_number=1):
100+
def AverageExtData(extdatas, min_number=3):
101101
"""
102102
Generate the average extinction curve from a list of ExtData objects
103103
@@ -106,7 +106,7 @@ def AverageExtData(extdatas, min_number=1):
106106
extdatas : list of ExtData objects
107107
list of extinction curves to average
108108
109-
min_number : int [default=1]
109+
min_number : int [default=3]
110110
minimum number of extinction curves that are required to measure the average extinction; if less than min_number of curves are available at certain wavelengths, the average extinction will still be calculated, but the number of points (npts) at those wavelengths will be set to zero (e.g. used in the plotting)
111111
112112
Returns
@@ -179,7 +179,9 @@ def AverageExtData(extdatas, min_number=1):
179179
if min_number > 1:
180180
aveext.npts[src][aveext.npts[src] < min_number] = 0
181181
warnings.warn(
182-
"The minimum number of extinction curves was not reached for certain wavelengths, and the number of points (npts) for those wavelengths was set to 0.",
182+
"The minimum number of "
183+
+ str(min_number)
184+
+ " extinction curves was not reached for certain wavelengths, and the number of points (npts) for those wavelengths was set to 0.",
183185
UserWarning,
184186
)
185187

@@ -525,9 +527,7 @@ def trans_elv_alav(self, av=None, akav=0.112):
525527
)
526528
else:
527529
if av is None:
528-
if "AV" in self.columns.keys():
529-
av = self.columns["AV"]
530-
else:
530+
if "AV" not in self.columns.keys():
531531
self.calc_AV(akav=akav)
532532
av = _get_column_val(self.columns["AV"])
533533

0 commit comments

Comments
 (0)