Calculating Magnitude like Astro ImageJ in Python

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]( 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]( 

Any help would be greatly appreciated.