Map#
- sunpy.map.Map = <sunpy.map.map_factory.MapFactory object>#
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
Path
object pointing to a FITS file.A directory containing FITS files (if there is more than one FITS file in the directory, it will return a list of Map objects).
A tuple containing a data array and a header (for modifying the data or header).
A
MetaDict
object, which includes data and metadata as a dictionary-like object.An
astropy.wcs.WCS
object, which represents the World Coordinate System for the data.A glob pattern to match multiple FITS files (e.g.,
eit_*.fits
).A URL pointing to a FITS file (can be remote).
A combination of any of the above inputs.
sequence (
bool
, optional) – Return asunpy.map.MapSequence
object comprised of all the parsed maps.composite (
bool
, optional) – Return asunpy.map.CompositeMap
object comprised of all the parsed maps.
- Returns:
sunpy.map.GenericMap
– If the input results in a singular map object, then that is returned.list
ofGenericMap
– If multiple inputs are given andsequence=False
andcomposite=False
(the default) then a list ofGenericMap
objects will be returned.sunpy.map.MapSequence
– If the input corresponds to multiple maps andsequence=True
is set, then aMapSequence
object is returned.sunpy.map.CompositeMap
– If the input corresponds to multiple maps andcomposite=True
is set, then aCompositeMap
object 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)