Time to compute axis_world_coords
scales poorly with dimensionality with off-diagonal elements in PCij
#554
Labels
axis_world_coords
scales poorly with dimensionality with off-diagonal elements in PCij
#554
Running
axis_world_coords
to get the corresponding world coordinates along a pixel axis scales poorly with dimensionality of the data array when there are off diagonal elements in the PCij.As an example, take the following WCS for a 3D data cube with two celestial axes and one wavelenth axis. The latitudinal dimension is coupled to the third pixel dimension through a single off diagonal element in the PCij matrix.
Note that the resulting
axis_correlation_matrix
isRunning
axis_world_coords
to get the wavelength array that corresponds to the third dimension takes over 2 s,If I increase
nz
to 20 (i.e. multiply the wavelength dimension by 4), I find that the execution time foraxis_world_coords
also goes up by a factor of 4,Based on a few data points, it looks like the execution time for
axis_world_coords
scales linearly withnz
.I'm assuming this is because an increasingly large
SkyCoord
array (the first entry inaxis_world_coords(0)
has to be computed and returned as the dimensionality grows.However, for much larger values of
nz
, it becomes impossibly slow to compute the corresponding world coordinates of the wavelength array. Is there some way to get this axis world coordinate with getting the corresponding celestial coordinates?The text was updated successfully, but these errors were encountered: