InstrumentBase#

class synthesizAR.instruments.InstrumentBase(observing_time, observer, plate_scale, cadence=None, pad_fov=None, fov_center=None, fov_width=None, rotation_angle=None, average_over_los=False)[source]#

Bases: object

Base class for instruments. This object is not meant to be instantiated directly. Instead, specific instruments should subclass this base object and implement a calculate_intensity_kernel method for that specific instrument.

Parameters:
  • observing_time (Quantity) – If cadence is also provided and this has a length of 2, this is interpreted as the start and end time of the observation period and an observing time is constructed based on this interval and the cadence. Otherwise, this is interpreted as the times at which the observations should be forward modeled.

  • observer (SkyCoord) – Coordinate of the observing instrument

  • plate_scale (Quantity)

  • cadence (Quantity, optional) – If specified, this is used to construct the observing time.

  • pad_fov (Quantity, optional) – Array specifying the padding to apply to the field of view of the synthetic image in both directions in pixel space. If None, no padding is applied and the field of view is defined by the maximal extent of the loop coordinates in each direction. Note that if fov_center and fov_width are specified, this is ignored.

  • fov_center (SkyCoord, optional) – Reference coordinate coinciding with the center of the field of view. For this to have an effect, must also specify fov_width.

  • fov_width (Quantity, optional) – Angular extent of the field of the view. For this to have an effect, must also specify fov_center.

  • average_over_los (bool, optional) – Set to true for non-volumetric quantities

Attributes Summary

Methods Summary

calculate_intensity_kernel(*args, **kwargs)

convolve_with_psf(smap, channel)

Perform a simple convolution with a Gaussian kernel

get_fov(coordinates)

Return the coordinate at the center of the FOV and the width in pixels.

get_header(ref_coord, n_pixels[, channel])

Create the FITS header for a given channel.

get_instrument_name(channel)

integrate_los(time, channel, skeleton, ...)

interpolate_to_instrument_time(kernel, loop, ...)

Interpolate the intensity kernel from the simulation time to the cadence of the instrument for the desired observing window.

observe(skeleton[, save_directory, ...])

Calculate the time dependent intensity for all loops and project them along the line-of-sight as defined by the instrument observer.

write_kernel_to_file(kernel, loop, indices, ...)

Attributes Documentation

cadence#
channels#
detector#
observatory#
observer#
observing_time#
pad_fov#
pixel_area#

Cartesian area on the surface of the Sun covered by a single pixel.

plate_scale#
projected_frame#
rotation_angle#
telescope#

Methods Documentation

calculate_intensity_kernel(*args, **kwargs)[source]#
convolve_with_psf(smap, channel)[source]#

Perform a simple convolution with a Gaussian kernel

get_fov(coordinates)[source]#

Return the coordinate at the center of the FOV and the width in pixels.

get_header(ref_coord, n_pixels: Unit('pix'), channel=None)[source]#

Create the FITS header for a given channel.

Parameters:
  • ref_coord (SkyCoord) – Reference coordinate coincident with the center of the field of view

  • n_pixels (Quantity) – Pixel extent in the x (horizontal) and y (vertical) direction

  • channel (ChannelBase, optional)

get_instrument_name(channel)[source]#
integrate_los(time, channel, skeleton, pixel_locations, n_pixels, visibilities, header, kernels=None)[source]#
static interpolate_to_instrument_time(kernel, loop, observing_time, axis=0)[source]#

Interpolate the intensity kernel from the simulation time to the cadence of the instrument for the desired observing window.

observe(skeleton, save_directory=None, channels=None, footpoint_height: Unit('cm') = None, **kwargs)[source]#

Calculate the time dependent intensity for all loops and project them along the line-of-sight as defined by the instrument observer.

Parameters:
  • skeleton (Skeleton)

  • save_directory (str or path-like) – Directory to save all of the resulting maps to.

  • channels (list of ChannelBase) – List of instrument channels for which to model the emission.

  • footpoint_height (Quantity) – Portion of each end of the strand that makes up the chromosphere. If specified, each strand will be masked at both footpoints by this amount. This masking is done in the field-aligned coordinate system \(s\) such that any points in each strand with \(s<f_P\) and \(s>L-f_P\). This masking is done in \(s\) rather than the real 3D coordinate because the atmospheric stratification is determined by the field-aligned model. In HYDRAD, this is typically 5 Mm. The reason for applying this masking is because the chromospheric emission is not accurately modeled by this approach and will be heavily overestimated.

static write_kernel_to_file(kernel, loop, indices, channel, name, tmp_store)[source]#