Calculating Magnitude like Astro ImageJ in Python

Affiliation
American Association of Variable Star Observers (AAVSO)
Thu, 08/10/2023 - 20:47

I am attempting to do multi-aperture photometry with ccdproc to calculate the magnitude for a target are given comparison stars. I am trying to follow this [paper’s](https://ui.adsabs.harvard.edu/abs/2017AJ....153...77C/abstract) calculation (Astro ImageJ) when it comes to the magnitude in Python. However, I get magnitudes of around -100 which is clearly unrealistic and I know the magnitude should be around -12. My project is located [here](https://github.com/kjkoeller/EclipsingBinaries/blob/main/EclipsingBinaries/multi_aperture_photometry.py). 

Any help would be greatly appreciated.

 

-Kyle