I would like to share a small program I wrote, currently called MetroPSF for the lack of better name, for differential ensemble PSF-fitting photometry. Initially wrote a small script to double-check the results I was getting through Astrometrica for the SN 2021gmj, however, thought it may be useful for public, so releasing the source code. It's a prototype, so the code quality is pretty low, but the results it produces should be ready for analysis. I would appreciate any feedback and suggestions. I thought I'd check if this is of interest to public at all by making a preliminary "alpha" release.
The READ ME file with a brief description and installation instructions: http://trafyx.com/wp...04/metropsf.pdf
The program files are here: http://trafyx.com/wp...04/metropsf.zip
MetroPSF works with VizieR and Astrometry.net for retrieving catalogs and solving, and the READ ME file describes a quick use case to familiarize with the interface. The screen shot of the program in action is here: https://i.ibb.co/LJDByRz/Screenshot-2021-04-08-20-24-03.png
This is very cool. It was easy to install and run from an Anaconda3 cmd prompt.
I look forward to exploring this!
Thanks, George. Note I've updated it to version 0.13:
• Added ensemble limit option.
• Added Gaia DR2 to comparison catalogs.
• Added non-linear image stretching via square root, log and asinh.
• Added ability to remove AAVSO VSX stars from the ensemble.
• Sources with AAVSO VSX match are plotted with yellow circles.
• Added reporting of nearby VSX sources.
• Added matching radius setting.
• Fixed loading of 16-bit FITS ﬁles.
Latest User Manual:
MetroPSF 0.13, released April 11, 2021:
Happy to announce the latest version of MetroPSF, 0.15. Lots of new stuff:
• Aperture photometry.
This is similar to common aperture photometry algorithms found in other software except that a 2D model of the background is subtracted from the image, so sky annuli are not used.
• AAVSO report generation.
MetroPSF can now generate AAVSO-compatible report files.
• Automatic reporting on all VSX sources in the image.
MetroPSF can generate reports on all VSX sources found in the image. It cycles through each VSX variable and builds a report file. Although I would not recommend to do automatic reports and submit them blindly (unless you know what exactly you are doing) this is helpful when you need to process multiple FITS files to create a report on a single object or multiple objects with, say, similar magnitudes.
• Batch processing of all FITS ﬁles in a folder.
Now it is possible to do photometric series, as MetroPSF can process multiple FITS files in a folder at once...
• Light curve generation from BAA reports.
...and display a light curve from all the report files generated.
• Added ability to remove outliers from the ﬁt - by ensemble limit and maximum separation.
Much more precise photometry, as you can set it up to automatically exclude comparison stars farther than R arcseconds from the target, or that are not fitting well into the comparison ensemble, e.g. limit ensemble to N stars.
• Reporting number of ensemble stars on the linear regression ﬁt plot.
• Object name in the left panel is now automatically set from VSX catalog for matching sources.
• Display next VSX source.
Can easily cycle through all known variables in your image.
• Mouse click now reports time in ISO UTC format along with photometry result.
To copy-paste in forums and discussions.
• Increased Astrometry.Net default solve timeout from 120 to 360 s.
• Linear regression ﬁt error is now based on standard deviation.
• MetroPSF now writes a log to metropsf.log.
• Astrometry.net URL and API key setting in the interface.
• PSF ﬁtting algorithm setting.
• FITS crop option.
Latest manual: http://trafyx.com/wp-content/uploads/2021/05/metropsf.pdf
MetroPSF program and manual: http://trafyx.com/wp-content/uploads/2021/05/metropsf-0.15.zip
Thanks for this work. I have been interested in trying out some psf calculations and this seems to be what I was looking for. I like easy access to the APASS 9 data. I'm also interested in using Sloan filters and I found I could get to the Sloan data in APASS 9 by changing the ' to a _, so the g' data could be found using g_ for the filter name. I'm still getting my observing equipment together so I'm not completely sure how my work flow is going to end up, but one thing that might be useful is allowing for comps and VSX stars to be read in from a VPhot sequence file. It is obviously more work to create a sequence file, but you have more control, you can use APASS 10 data, and you can do comparisons to VPhot calculations with exactly the same comp stars. I might even give that bit a programming a try myself.
I am happy you wrote this program.
I noticed the following:
From line 443 in metropsf.pyw; version 0.15:
# Calculate instrumental magnitudes
self.results_tab_df["inst_mag"] = -2.5 * np.log(self.results_tab_df["flux_fit"] / exptime) + 25
self.results_tab_df["inst_mag_min"] = -2.5 * np.log((self.results_tab_df["flux_fit"] - self.results_tab_df["flux_unc"]) / exptime) + 25
self.results_tab_df["inst_mag_max"] = -2.5 * np.log((self.results_tab_df["flux_fit"] + self.results_tab_df["flux_unc"]) / exptime) + 25
self.photometry_results_plotted = True
Name: flux_fit, Length: 96, dtype: float64
np.log(self.results_tab_df["flux_fit"] / exptime)
0 3.960473<----------------------------------------------------------should be 1.720
Name: flux_fit, Length: 96, dtype: float64
np.log is not base 10, its the natural log (ln); it should be np.log10; Correct?
Pierre "Pete" Fleurant
I am sorry for…
I am sorry for not replying on the forum earlier. There was no e-mail notification. As we have discussed over e-mail, it doesn't really matter.
I am trying to install your metropsf programm on my Win0 machine. I have downloaded Python, extracted the MetroPSF distribution and tried to run pip install...
However neither in Python nor in the WIn 10 Command line programm it will run this pip command.
Any help is appreciated.
Sorry for not…
Sorry for not replying here - didn't get an e-mail notification. Just to confirm we have resolved this as pip should be run from the command line, not the Python prompt.
Welcome to MAOPhot 0.1, a PSF Photometry tool using Astropy and Photutils.psf
This program was derived from MetroPSF by Maxym Usatov.
It has been redesigned for AAVSO reporting only and includes, but not limited
to the following enhancements:
- Generation of Two-Color Photometry (B, V), (V, R) or (V, I), and Single Image
Photometry reports in AAVSO extended format
- Use of telescope Transformation Coefficients (needed for Two Color Photometry)
- Image display shows comp star AAVSO label number and name of any found VSX
objects in image field
- Generation of Effective PSF model, and ability to create a ‘rejection list.’
- option to use an Integrated Gaussian PRF (Pixel Response Function) as model
- PSF Photometry using an iterative algorithm to perform point spread function
photometry in crowded fields
- Photometry using an ensemble of comparison stars or a single comp star
- Intermediate results are saved as .csv files
- User can optionally enter a AAVSO Chart ID when retrieving comparison star data
- User can specify check star and list of comp stars to use
MAOPhot calculates stellar magnitudes from 2 dimensional digital photographs.
It produces an extended AAVSO (American Association of Variable Star Observers)
report which can be submitted to the AAVSO using the online tool WebObs (http://www.aavso.org/webobs).
There are many photometry measuring programs available such as VPhot
(http://www.aavso.org/vphot) and AstroImageJ (University of Louisville).
VPhot uses the aperture photometry method.
MAOPhot uses the PSF Photometry method exclusively. PSF (point spread function)
modeling is well suited for measuring stellar magnitudes in crowded fields, or
the magnitude of a star that has a close companion, e.g., Z Tau.
MAOPhot is written in Python. It uses many Python 'astropy'
(https://www.astropy.org/) libraries. The astropy package contains key
functionality and common tools for performing astronomy and astrophysics with
Python. Included in the package is Photutils.psf. See "PSF Photometry"
(https://photutils.readthedocs.io/en/stable/psf.html) which describes many of
the classes and methods used in MAOPhot.