Map#
- sunpy.map.Map = <sunpy.map.map_factory.MapFactory object>[source]#
A factory for generating coordinate aware 2D images.
This factory takes a variety of inputs, such as file paths, wildcard patterns or (data, header) pairs.
Depending on the input different return types are possible.
- Parameters:
*inputs – Inputs to parse for map objects. This can be one or more of the following:
A string or
Pathobject pointing to a file.A directory containing files.
A glob pattern matching multiple files (for example,
eit_*.fits).A URL or URI pointing to a file (can be remote).
An existing
GenericMap.A tuple of
(data, metadata)or(data, wcs), where metadata is adict(includingMetaDict) or anastropy.io.fits.Header, andwcsis anastropy.wcs.WCS.A data array followed immediately by that same metadata or
astropy.wcs.WCS.
These inputs can be mixed in one call, but any data array must be immediately followed by its metadata or WCS.
sequence (
bool, optional) – Return asunpy.map.MapSequenceobject comprised of all the parsed maps.composite (
bool, optional) – Return asunpy.map.CompositeMapobject comprised of all the parsed maps.
- Returns:
sunpy.map.GenericMap– If the input results in a singular map object, then that is returned.listofGenericMap– If multiple inputs are given andsequence=Falseandcomposite=False(the default) then a list ofGenericMapobjects will be returned.sunpy.map.MapSequence– If the input corresponds to multiple maps andsequence=Trueis set, then aMapSequenceobject is returned.sunpy.map.CompositeMap– If the input corresponds to multiple maps andcomposite=Trueis set, then aCompositeMapobject is returned.
Examples
>>> import sunpy.map >>> from astropy.io import fits >>> import sunpy.data.sample >>> mymap = sunpy.map.Map(sunpy.data.sample.AIA_171_IMAGE)