rice-solar-physics / pydrad

Python tools for setting up HYDRAD runs and parsing output
https://pydrad.readthedocs.io
MIT License
4 stars 3 forks source link

Support slicing for Profile objects #114

Open wtbarnes opened 4 years ago

wtbarnes commented 4 years ago

Similar to how Strand profiles can be parsed in the time dimension, one should also be able to slice Profile objects in the spatial dimension. This would make it easy to just do an index on a Profile and then compute the EM distribution over only part of the loop (near the apex say). As an example,

s = Strand('/hydrad')
p = s[100]
p[10:150].column_emission_measure()

If we do this, we should consider caching the data matrices so that they are not read every time you take a slice.