MBravoS / splotch

Simple PLOTs, Contours and Histograms is a small package with wrapper functions designed to simplify plotting calls from matplotlib.
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

splt.statband() does not accept function for stat_low/stat_high #57

Closed AstroRobin closed 2 years ago

AstroRobin commented 3 years ago

There is a bug in splt.statband() if a function is given for the 'stat_low' or 'stat_high' parameters. This is caused by the following line: elif 'std' in band_stat[i] and len(band_stat[i].replace('std',''))>0:

Because a function cannot be iterated over when checking if 'std' in band_stat[i]. In order to get around this, we could add a check prior of the form:

elif callable(band_stat[i]):

MBravoS commented 2 years ago

This was fixed in 0.5.4.2.