Repository navigation
imProc.mask
The imProc.mask package contains functions that search, use, and populate the MaskImage object inside the AstroImage object.
MaskImage is a container class for bit mask images. A bit mask image contains an image in unsigned integer format (default is uint32), in which each pixel corresponds to a pixel in the science image, and each bit in the unsigned integer corresponds to a state or a problem in this pixel. The bit names in the bit mask itself are managed by the BitDictionary class.
Some basic functionality to convert between bit names, indices and decimal representation are available in the BitDictionary class. Some basic functions to treat MaskImage are available as part of the MaskImage class.
The following functions are available:
- imProc.mask.allFunList - List of all functions in the package.
- maskBadColumns - Mask pixels which belong to bad columns, by applying a sliding block filter.
- maskCR - Mask cosmic rays in an image [TBD]. See also: imProc.sources.cleanSources
- maskSaturated - Set mask bits for saturated and non-linear pixels. This function can get the saturation level from the image header.
- replaceMaskedPixVal - Replace the values of image pixels which have a specific bit mask.
- interpOverMaskedPix - Interpolate over pixels with a specific bit mask.
- maskHoles - Search for holes (negative sources) in images and add a bitmask marking the hole's central position (A hole can be generated from stars in the flat image).
- maskSourceNoise - Mask pixels that are dominated by source noise (rather than background noise).
- maskTracks - Mask satellite/airplane tracks as lines in the image, using Hough transform.
- unitTest - Test the package.
% AI is An AstroImage object:
% maskSaturated
AI = AstroImage({rand(10,10).*1000});
Result = imProc.mask.maskSaturated(AI, 'SatLevel',500)
Result = imProc.mask.maskSaturated(AI, 'SatLevel',500, 'NonLinLeve',100)
Result = imProc.mask.maskSaturated(AI, 'SatLevel',500, 'NonLinLeve',100,'MultLevelByGain',true,'Gain',5);
% replaceMaskedPixVal
imProc.mask.replaceMaskedPixVal(AI, 'Saturated', NaN);
% interpOverMaskedPix
% Note that by default interpolated pixels will be marked by the 'Interp' bit (see function help).
Result = imProc.mask.interpOverMaskedPix(Obj);
Result = imProc.mask.interpOverMaskedPix(Obj,'BitNamesToInterp',{'Saturated','HighRN'});
% maskHoles
AI=AstroImage({rand(1000,1000)});
AI=imProc.background.background(AI)
AI.MaskData.Image=uint32(zeros(1000,1000));
AI = imProc.mask.maskHoles(AI);
% maskSourceNoise
AI = imProc.mask.maskSourceNoise(AI);- AstroPack/MAATv2 content
- Install
- Coding conventions
- Getting Started
- List of all functions, classes, and methods
- startup file
- configuration files
- PasswordsManager
- New functions and changes log
- Pipeline tasks
- Requested Functionality
- unitTest
- File names
- Catalogs
- Headers
- Matched sources catalog
- Image bit mask
- Merged catalog bit mask
- Photometric Calibration
- LAST production releases
- [Introduction to image processing]
-
Databases
- The imUtil package
- The imProc package
- [The lcUtil package]
- [Spectra processing]
- AstroSpec class
- [imProc.spec]
- [pipelines]
- Generate a calibrated source catalog from an image
- Forced photometry
- [Astrometry-related topics]
- Registration and coaddition
- [Image subtraction and transient detection]
- Asteroids ephemeris and matching to sources
- Quering an AstroDb database
- Display and inspect images without DB
- [The celestial package - coordinates and epehemerides]
- [celestial.coo]
- celestial.time
- celestial.map
- celestial.Kepler
- celestial.SolarSys
- celestial.INPOP
- [celestial.ephem]
- celestial.OrbitalEl
- celestial.conjunctions
- [celestial.Targets]
- [celestial.scheduling]
- celestial.earth
- [celestial.htm]
- [celestial.pm]
- [celestial.meterors]
- [celestial.rigidBody]
- celestial.search
- [celestial.stars]
- celestial.proj
- celestial.grid
- [The astro package]
- [Cosmology]
- [Spectra]
- [Gravitational Lensing]
- [binary]
- extinction
- [occultation]
- stars
- [supernova]
- constant - physical constants
- convert - physical units conversions
- [timeSeries - Time series analysis tools]
- [arma]
- [bin]
- [detrend]
- [fit]
- [fold]
- [interp]
- [period]
- [rand]
- [stat]
- [time]
- [xcorr]
- [timeDelay]
- [Virtual observatory and catalogs]
- [Plotting tools]
- [General tools]
- tools package
- www package
- [io package]
- [Database]
- [Low-level classes]
- [Base and Component]
- [Msg loggers and syslog]
- [Developers]