Visibility#

class stixpy.product.sources.Visibility(*, header, control, data, energies)[source]#

Bases: ScienceData

Compressed visibilities from selected pixels, detectors and energies.

Examples

# >>> from stixpy.data import test # >>> from stixpy.science import ScienceData # >>> visibility = ScienceData.from_fits(test.STIX_SCI_XRAY_VIZ) # >>> visibility # Visibility <sunpy.time.timerange.TimeRange object at …> # Start: 2020-05-07 23:59:58 # End: 2020-05-08 00:00:14 # Center:2020-05-08 00:00:06 # Duration:0.00018518518518517713 days or # 0.004444444444444251 hours or # 0.26666666666665506 minutes or # 15.999999999999304 seconds # DetectorMasks # [0…4]: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31] # <BLANKLINE> # PixelMasks # [0]: [[[‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’]]] # [1]: [[[‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’]]] # [2]: [[[‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’]]] # [3]: [[[‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’]]] # [4]: [[[‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’ ‘0.0’] # [‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘0.0’ ‘1.0’]]] # <BLANKLINE> # EnergyEdgeMasks # [0]: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31] # <BLANKLINE>

Attributes Summary

detectors

A stixpy.science.DetectorMasks object representing the detectors contained in the data.

duration

An astropy.units.Quantiy array giving the duration or integration time

energies

A astropy.table.Table object representing the energies contained in the data.

level

pixels

A stixpy.science.PixelMasks object representing the pixels contained in the data

service_subtype

Service subtype

service_type

Service type

ssid

Science Structure ID for product

time_range

A sunpy.time.TimeRange for the data.

times

An astropy.time.Time array representing the center of the observed time bins.

Methods Summary

concatenate(others)

Concatenate two or more science products.

get_data([time_indices, energy_indices, ...])

Return the counts, errors, times, durations and energies for selected data.

is_datasource_for(*, meta, **kwargs)

Determines if meta data meach Raw Pixel Data

Attributes Documentation

detectors#

A stixpy.science.DetectorMasks object representing the detectors contained in the data.

duration#

An astropy.units.Quantiy array giving the duration or integration time

energies#

A astropy.table.Table object representing the energies contained in the data.

level#
pixels#
service_subtype#

Service subtype

service_type#

Service type

ssid#

Science Structure ID for product

time_range#

A sunpy.time.TimeRange for the data.

times#

An astropy.time.Time array representing the center of the observed time bins.

Methods Documentation

concatenate(others)#

Concatenate two or more science products.

Parameters:

others (list [stixpy.science.ScienceData]) – The other/s science products to concatenate

Returns:

stixpy.science.ScienceData – The concatenated science products

get_data(time_indices=None, energy_indices=None, detector_indices=None, pixel_indices=None, sum_all_times=False)#

Return the counts, errors, times, durations and energies for selected data.

Optionally summing in time and or energy.

Parameters:
  • time_indices (list or numpy.ndarray) – If an 1xN array will be treated as mask if 2XN array will sum data between given indices. For example time_indices=[0, 2, 5] would return only the first, third and sixth times while time_indices=[[0, 2],[3, 5]] would sum the data between.

  • energy_indices (list or numpy.ndarray) – If an 1xN array will be treated as mask if 2XN array will sum data between given indices. For example energy_indices=[0, 2, 5] would return only the first, third and sixth times while energy_indices=[[0, 2],[3, 5]] would sum the data between.

  • detector_indices (list or numpy.ndarray) – If an 1xN array will be treated as mask if 2XN array will sum data between given indices. For example detector_indices=[0, 2, 5] would return only the first, third and sixth detectors while detector_indices=[[0, 2],[3, 5]] would sum the data between.

  • pixel_indices (list or numpy.ndarray) – If an 1xN array will be treated as mask if 2XN array will sum data between given indices. For example pixel_indices=[0, 2, 5] would return only the first, third and sixth pixels while pixel_indices=[[0, 2],[3, 5]] would sum the data between.

  • sum_all_times (bool) – Flag to sum all give time intervals into one

Returns:

tuple – Counts, errors, times, deltatimes, energies

classmethod is_datasource_for(*, meta, **kwargs)[source]#

Determines if meta data meach Raw Pixel Data