Maps (sunpy.map
)#
sunpy Map objects are constructed using the special factory class:
- class sunpy.map.map_factory.MapFactory(default_widget_type=None, additional_validation_functions=[], registry=None)[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. See the examples section for a detailed list of accepted 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)
sunpy.map Package#
Map objects are constructed using the special factory class: Map
.
All sunpy Maps are derived from sunpy.map.GenericMap
, all the methods and attributes are documented in that class.
The result of a call to Map
will be either a GenericMap
object if no instrument matches, or a subclass of GenericMap
which deals with a specific source of data, e.g., AIAMap
or LASCOMap
(see sunpy.map Package to see a list of all of them).
sunpy.map Package#
Functions#
|
Returns the coordinates of the center of every pixel in a map. |
Returns the coordinates of the pixel corners in a map. |
|
Returns pixel pair indices of every pixel in a map. |
|
|
Checks whether a coordinate falls within the bounds of a map. |
|
Checks if a map contains the full disk of the Sun. |
|
Checks if a map contains any part of the solar limb or equivalently whether the map contains both on-disk and off-disk pixels. |
|
Returns |
|
Checks if the helioprojective Cartesian coordinates are on the solar disk. |
|
Checks if none of the coordinates in the |
|
Checks if all of the coordinates in the |
|
Returns the pixel locations of the edges of an input map. |
Returns the the bottom left and top right coordinates of the smallest rectangular region that contains all the on disk coordinates of the input map. |
|
|
Return the pixel coordinates for every pixel that intersects with a coordinate path. |
|
Samples the data in a map at given series of coordinates. |
|
Calculates the solar angular radius as seen by the observer. |
Classes#
|
A Composite Map class |
|
A Generic spatially-aware 2D data array |
|
A series of Maps in a single object. |
|
Variables#
A factory for generating coordinate aware 2D images. |
Class Inheritance Diagram#
Header helpers#
The header_helper sub-module contains helper functions for generating FITS-WCS headers from Python objects.
sunpy.map.header_helper Module#
Functions#
|
Function to create a FITS-WCS header from a coordinate object ( |
|
Function to get observer meta from coordinate frame. |
|
Construct a FITS-WCS header for a full-Sun heliographic (Carrington or Stonyhurst) coordinate frame. |
Instrument Map Classes#
Defined in sunpy.map.sources
are a set of GenericMap
subclasses which convert the specific metadata and other differences in each instruments data to the standard GenericMap
interface.
These ‘sources’ also define things like the colormap and default normalization for each instrument.
These subclasses also provide a method, which describes to the Map
factory which data and metadata pairs match its instrument.
sunpy.map.sources Package#
Functions#
|
Test determining if the given metadata contains Helioviewer Project sourced data. |
|
Assign the correct source-dependent image stretching function. |
Classes#
|
ADAPT magnetic flux map |
|
AIA Image Map. |
|
STEREO-SECCHI CORonograph Image Map. |
|
SOHO EIT Image Map. |
|
EUI Image Map |
|
STEREO-SECCHI EUVI Image Map |
|
GONG H-Alpha Map. |
|
GONG Synoptic Map. |
|
STEREO-SECCHI Heliospheric Imager (HI) Map. |
|
HMI Image Map. |
|
SDO/HMI Synoptic Map. |
|
K-Cor Image Map. |
|
SOHO LASCO Image Map |
|
SOHO MDI Image Map |
|
SOHO MDI synoptic magnetogram Map. |
|
RHESSI Image Map. |
|
A 2D IRIS Slit Jaw Imager Map. |
|
Hinode SOT Image Map definition. |
|
SUVI Image Map. |
|
PROBA2 SWAP Image Map. |
|
Yohkoh SXT Image Map |
|
TRACE Image Map |
|
WISPR Map |
|
Hinode XRT map definition. |