sstcam / sstcam_nsb

Issue tracking and script storage for SSTCAM investigations of night sky background
2 stars 0 forks source link

Validate pixel values #5

Closed STSpencer closed 3 years ago

STSpencer commented 3 years ago

The fact that astropy doesn't support nanoLamberts as a unit is annoying, and so it's difficult to know if pixel values extracted using photutils are correct. It might be worth converting nsb output to mags/arcsec^2 (which should be supported by astropy), doing the photutils integration, and then changing back to nanolambers and seeing if the results change.

STSpencer commented 3 years ago

Trying to use magnitudes was a bad idea, turns out photutils doesn't seem to support logarithmic units, so it just adds up the magnitude values linearly (i.e. you wind up with a pixel having a magnitude 700000).

Thankfully, there's a conversion factor between the SI units candela/m^2 and Lamberts (c.f. https://en.wikipedia.org/wiki/Lambert_(unit)), so I've added that into the script. The values in nLb are the same ultimately, so I'm a bit more confident in the results now (certainly they should be reasonably reliable as relative brightnesses).