spacetelescope / imexam

imexam is a python tool for simple image examination, and plotting, with similar functionality to IRAF's imexamine
http://imexam.readthedocs.io
BSD 3-Clause "New" or "Revised" License
74 stars 45 forks source link

Precision of magnitude and zeropoint on screen and figure #245

Open patkel opened 2 years ago

patkel commented 2 years ago

Hi again, I am hoping to imexam for a class in the spring semester, so I am just trying to make sure that the students will be able to use it for basic photometry. I noticed that the precision of the magnitude measurements is not enough for a useful exercise, and I wanted to suggest adding additional precision.

In imexamine.py, I added and "f" and a small amount of additional precision in the formatting here (line 634):

        # Construct the output strings (header and parameter values)
        pheader = f"x\ty\tradius\tflux\tmag(zpt={magzero:0.2f})\t"
        pstr = f"\n{x:.2f}\t{y:0.2f}\t{radius}\t{total_flux:0.2}\t{mag:0.3f}\t"

and here (line 665):

                title = f"x= {xx:0.2f}, y={yy:0.2f}, flux={total_flux:0.1f}, \nmag={mag:0.3f}, sky={sky_per_pix:0.1f}"

There seems to be more than enough room for the additional precision, so I hope this might work.