QuantifySubtraction
Quantify in various ways how good star subtraction
Space Telescope Science Institute
Synopsis
Quantify in various ways how good star subtraction is between two images, in which star fluxes have been calculated using MefPhot
Command Line Usage
usage: QuantifySubtraction.py orig_file subtracted_file [more pairs...]
Description
Primary routines:
doit - Process a single pair of files do_many - Process multiple pairs and create comparison table
Primary Routines
- doit - Process a single pair of files
do_many - Process multiple pairs and create comparison table
Notes
History:
251229 ksl Coding begun 251229 ksl Refactored for modularity and result capture
Version History
- 251229 ksl
Coding begun
- 251229 ksl
Refactored for modularity and result capture
Functions
|
Calculate all subtraction quality metrics |
|
Create a single combined figure with all analysis types |
|
Process multiple file pairs and create comparison table |
|
Analyze subtraction quality for a single pair of files |
|
|
|
Steering routine for command line usage |
Module Contents
- QuantifySubtraction.calculate_metrics(orig, subtracted)
Calculate all subtraction quality metrics
Returns a dictionary with summary statistics
- QuantifySubtraction.create_combined_figure(orig, subtracted, outroot)
Create a single combined figure with all analysis types
- QuantifySubtraction.do_many(file_pairs, output_table='SubQual/comparison_metrics.fits')
Process multiple file pairs and create comparison table
Parameters:
- file_pairslist of tuples
List of (orig_phot, subtracted_phot) pairs
- output_tablestr
Path to save the comparison metrics table
Returns:
- resultsastropy.table.Table
Table with metrics for all file pairs
- QuantifySubtraction.doit(orig_phot, subtracted_phot, outroot='', combined=True)
Analyze subtraction quality for a single pair of files
Parameters:
- orig_photstr
Path to original photometry table
- subtracted_photstr
Path to subtracted photometry table
- outrootstr
Root name for output files (derived from subtracted_phot if empty)
- combinedbool
If True, create a single combined figure
Returns:
- metricsdict
Dictionary of calculated metrics
- QuantifySubtraction.get_pairs(xdir='TabPhot', prefix='LMC')
- QuantifySubtraction.steer(argv)
Steering routine for command line usage