indica-mcf / Indica

Integrated DiagnostiC Analysis
GNU General Public License v3.0
6 stars 0 forks source link

Allow atomic_data to take multi-dimensional profiles #205

Open k-collie opened 1 year ago

k-collie commented 1 year ago

Currently the functions in atomic_data can only handle 1-D profiles (usually rho). It would be useful if it could handle multiple dimensions (notably time), to avoid the following style concatenations:

    elem: xr.concat(
        [
            FA[elem](
                Ne=ne.interp(t=time),
                Te=te.interp(t=time),
                tau=time,
            ).expand_dims("t", -1)
            for time in t.values
        ],
        dim="t",
    )
    .assign_coords({"t": t.values})
    .assign_attrs(transform=flux_surface)
k-collie commented 1 year ago

Alternatively, since FA only depends on Ne and Te which are both 1D on rho, use 1D profile to calculate and then interpolate onto 2D profile.