philrosenfield / match

Python utilities for processing and plotting input and output from Andy Dolphin's MATCH
MIT License
4 stars 1 forks source link

completeness fraction #7

Closed dweisz closed 7 years ago

dweisz commented 8 years ago

asts.completeness_plot(comp_fracs=[0.5])

gives:


TypeError Traceback (most recent call last)

in () ----> 1 asts.completeness_plot(comp_fracs=[0.5]) /Users/dweisz/Documents/code/match/scripts/asts.pyc in completeness_plot(self, ax, comp_fracs) 537 538 if comp_fracs is not None: --> 539 self.add_complines() 540 ax.set_xlabel(r'${{\rm mag}}$', fontsize=20) 541 ax.set_ylabel(r'${{\rm Completeness\ Fraction}}$', fontsize=20) TypeError: add_complines() takes at least 2 arguments (1 given)
philrosenfield commented 8 years ago

comp_fracs was not being passed to add_complines. I fixed and tested it over here. Please verify and close if solved.

dweisz commented 8 years ago

The error is now gone. Thanks. But if you look at the ipython notebook in examples, there are no completeness lines being plotted as far as I can tell.

philrosenfield commented 8 years ago

I’m actually playing with that now and seeing the same thing.

asts.get_completeness_fraction(0.5)

that works though...

On Nov 5, 2015, at 4:04 PM, Dan Weisz notifications@github.com wrote:

The error is now gone. Thanks. But if you look at the ipython notebook in examples, there are no completeness lines being plotted as far as I can tell.

— Reply to this email directly or view it on GitHub https://github.com/dweisz/match/issues/7#issuecomment-154190655.

dweisz commented 8 years ago

Still not seeing it work on my end.

philrosenfield commented 8 years ago

I got the error, worked when I tried in on ipynb ... pull. Hopefully I didn't mess up the ipython notebook example by accidentally committing my changes.

philrosenfield commented 8 years ago

I added a doc string too, the comp_fracs need to be a list. So comp_fracs=0.5 will trigger an error, but comp_fracs=[0.5] should be fine. It was made to plot comp_fracs=[0.5, 0.9] if that's silly, it can easily take one value instead.