Strand#

class pydrad.parse.Strand(hydrad_root, **kwargs)[source]#

Bases: object

Container for parsing HYDRAD results

Parameters:
  • hydrad_root (path-like) – Path to HYDRAD simulation directory

  • read_from_cfg (bool, optional) – If True, create the time array from the cadence as specified in HYDRAD/config/hydrad.cfg and the start time as given in the first AMR file. Note that this is substantially faster than reading the time from every AMR file, but there may be small differences between these approximate time steps and the exact time steps listed in the AMR files.

Attributes Summary

config

Configuration options.

initial_conditions

~pydrad.parse.Profile for the solutions to the hydrostatic equations used as initial conditions.

loop_length

Footpoint-to-footpoint loop length

time

Simulation time

Methods Summary

animate(**kwargs)

Simple animation of time-dependent loop profiles.

column_emission_measure([bins, bounds])

Column emission measure as a function of time

get_uniform_grid(delta_s)

Create a spatial grid with uniform spacing delta_s.

get_unique_grid()

peek(**kwargs)

Quick look at all profiles for the run on a single plot.

peek_emission_measure([bins, bounds])

peek_time_distance([quantities, delta_s])

Quick look at time-distance plots of various quantities.

spatial_average(quantity[, bounds])

Compute a spatial average of a specific quantity or quantities

to_constant_grid(name, grid[, order])

Interpolate a given quantity onto a spatial grid that is the same at each time step.

to_hdf5(filename, *variables)

Save variables to an HDF5 file

Attributes Documentation

config#

Configuration options. This will only work if the simuation was also configured by pydrad.

initial_conditions#

~pydrad.parse.Profile for the solutions to the hydrostatic equations used as initial conditions.

loop_length#

Footpoint-to-footpoint loop length

time#

Simulation time

Methods Documentation

animate(**kwargs)[source]#

Simple animation of time-dependent loop profiles. Takes the same keyword arguments as ~pydrad.visualize.animate_strand

column_emission_measure(bins=None, bounds=None)[source]#

Column emission measure as a function of time

get_uniform_grid(delta_s: Unit('cm'))[source]#

Create a spatial grid with uniform spacing delta_s.

Parameters:

delta_s (astropy.units.Quantity) – Spacing between each grid point

get_unique_grid()[source]#
peek(**kwargs)[source]#

Quick look at all profiles for the run on a single plot. Takes the same keyword arguments as ~pydrad.visualize.plot_strand

peek_emission_measure(bins=None, bounds=None, **kwargs)[source]#
peek_time_distance(quantities=None, delta_s: Unit("cm") = <Quantity 1. Mm>, **kwargs)[source]#

Quick look at time-distance plots of various quantities. Takes the same keyword arguments as ~pydrad.visualize.plot_time_distance

spatial_average(quantity, bounds=None)[source]#

Compute a spatial average of a specific quantity or quantities

to_constant_grid(name, grid: Unit('cm'), order=1)[source]#

Interpolate a given quantity onto a spatial grid that is the same at each time step.

Parameters:
  • name (str) –

  • grid (~astropy.units.Quantity) – Spatial grid to interpolate onto

  • order (int) – Order of the spline interpolation. Default is 1.

to_hdf5(filename, *variables)[source]#

Save variables to an HDF5 file

Parameters:
  • filename (str or path-like) – Path to HDF file

  • variables (list) – Names of variables to save to file