Map3D¶

class solarbextrapolation.map3dclasses.Map3D(data, meta, **kwargs)[source]

Bases: object

A basic data structure for holding a 3D numpy array of floats or 3-float vectors and metadata. The structure can be saved/loaded (using pickle ATM).

Parameters: The numpy array containing the numerical data. meta : dictionary The container for additional information about the data in this object. Where: * x/y/zrange: the max/min spacial positions along the given axis. * x/yobsrange: the observational data range, often in arcsec. * cdelt1/2/3: the size of each pixel in each axis. * unit1/2/3: the spacial units in each axis. * naxis1/2/3: the number of pixels in each axis.

Attributes Summary

 date Image observation time dsun The observer distance from the Sun. is_scalar Returns true if data is a volume of scalar values (3D array) or false if it is a volume of vector values (4D array). rsun_meters Radius of the sun in meters scale Image scale along the x, y and z axes in units/pixel (cdelt1/2/3) units Image coordinate units along the x, y and z axes (cunit1/2/3).

Methods Summary

 load(filepath, **kwargs) Load a Map3D instance using pickle. save(filepath[, filetype]) Saves the Map3D object to a file.

Attributes Documentation

date

Image observation time

dsun

The observer distance from the Sun.

is_scalar

Returns true if data is a volume of scalar values (3D array) or false if it is a volume of vector values (4D array).

rsun_meters

Radius of the sun in meters

scale

Image scale along the x, y and z axes in units/pixel (cdelt1/2/3)

units

Image coordinate units along the x, y and z axes (cunit1/2/3).

Methods Documentation

classmethod load(filepath, **kwargs)[source]

Load a Map3D instance using pickle.

save(filepath, filetype='auto', **kwargs)[source]

Saves the Map3D object to a file.

Currently uses Python pickle. https://docs.python.org/2/library/pickle.html In the future support will be added for saving to other formats.

Parameters: filepath : string Location to save file to. filetype : string ‘auto’ or any supported file extension