waqasbhatti / astrobase

Python modules for light curve work and variable star astronomy
MIT License
55 stars 12 forks source link

possible bls_snr() error #45

Closed joshuawallace closed 6 years ago

joshuawallace commented 6 years ago

I didn't look at this in depth, but on line 948 in kbls.py (the bls_snr() function) I noticed something that looked a bit funny to me.

transitphase = thistransduration*period/2.0

Since in the subsequent lines we're working in phase rather than time, it seems strange to me that we're multiplying by a period here. If thistransduration is still in units of time, we should be dividing by period; if it's in units of (fractional) phase, then no need to multiply or divide by period.

Again, I didn't look any closer, but I just noticed this and figured I'd point it out.

waqasbhatti commented 6 years ago

Yep, that was definitely incorrect and should've been:

transitphase = thistransduration/2.0

because we're already in phase units. Thanks for pointing this out!

Now fixed in git HEAD.