pyimcom.diagnostics.dynrange
Code to construct dynamic range estimates from block files.
Functions
- gen_dynrange_data
Generates dynamic range data and writes to files.
Attributes
Functions
|
Takes files from inpath and writes histograms to outstem. |
|
Module Contents
- gen_dynrange_data(inpath, outstem, rpix_try=50, nblockmax=100)[source]
Takes files from inpath and writes histograms to outstem. inpath should be a function that takes ix and iy and returns a file name
Optional input parameters: rpix_try : int = radius over which to compute profiles
(needs to be an integer less than the padding, will truncate)
- nblockmaxmaximum block number to consider (default 100, only need to
reduce this if you want to make a report generate faster for testing)
The output files are:
- Histograms:
outstem +’_sqrtS_hist.dat’: histogram of noise amplification factor sqrtS outstem +’_neff_hist.dat’: histogram of effective exposure number
Both of these have a header that indicates the fraction of data that is off scale high.
- dynamic range file:
outstem +’_dynrange.dat’: table of percentiles of noisy star images
(Columns are radius and [1,5,25,50,75,95,99] percentiles)
Returns a dictionary of which files were successfully generated: output[key] = filename (if successful), None (if not successful) Current file keys: ‘SQRTS’, ‘NEFF’, ‘DYNRANGE’ Header information is in keys ‘SQRTS_HEADER’ and ‘NEFF_HEADER’ Number of blocks read is in ‘COUNTBLOCK’