LM-SAL / aiapy

Python library for AIA data analysis
https://aiapy.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Function for isolating Fe XVIII emission from 94 observations #92

Open nabobalis opened 3 years ago

nabobalis commented 3 years ago

In GitLab by @wtbarnes on May 14, 2021, 08:26

There are several established methods for filtering 94 images to isolate the "hot" component which is dominated by Fe XVIII, e.g. https://iopscience.iop.org/article/10.1088/0004-637X/759/2/141.

It would be nice to have a function that takes in a 94, 171, and 193 image and returns a "hot" 94 image. These should be level 1.5 images, with equivalent dimensions.

Potentially, this could go in some new subpackage (maybe analysis?) as it does not really fit into any of the current ones. There should probably also be some discussion about whether this is in the scope of this package at all...

A quick mockup of what this could look like

def filter_94_hot(m_94, m_171, m_193):
    # Check that all are 1.5, of equivalent dimensions, error if they aren't
    c_fit = [-7.19e-2, 9.75e-1, 9.79e-2, -2.81e-3]
    A_fit = 0.39
    B_fit = 116.32
    f_fit = 0.31
    I_max_fit = 27.5
    I_94_warm = 0.0
    for i,cf in enumerate(c_fit):
        if i > 0:
            x = (f_fit * m_171.data + (1 - f_fit) * m_193.data) / B_fit
            x[x>=I_max_fit] = I_max_fit
        else:
            x = 1
        I_94_warm += A_fit * cf * x**i
    # Make metadata modifications to indicate this has been filtered?
    return m_94._new_instance(m_94.data - I_94_warm, copy.deepcopy(m_94.meta))
nabobalis commented 3 years ago

In GitLab by @PaulJWright on May 14, 2021, 15:41

I believe this will also require the data to be degradation-corrected first? Assuming 1.5 doesn't include this requirement.

nabobalis commented 3 years ago

In GitLab by @wtbarnes on May 20, 2021, 12:09

I hadn't actually thought of that. Currently, we don't add/change any metadata when doing the degradation correction so I'm not sure of an easy way to check for this.

I would probably just leave this up the user to figure out beforehand whether they need to do this.

nabobalis commented 3 years ago

In GitLab by @wtbarnes on May 20, 2021, 12:09

It probably should also be double checked how generally applicable these hardcoded fit parameters actually are.