Skip to content

Commit

Permalink
Aggregate dimensions and axes into structs in Frame and FileLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
confluence committed Nov 5, 2024
1 parent 1d6821e commit 5a69dcd
Show file tree
Hide file tree
Showing 10 changed files with 257 additions and 262 deletions.
13 changes: 7 additions & 6 deletions src/FileList/FileExtInfoLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,17 @@ bool FileExtInfoLoader::FillFileInfoFromImage(CARTA::FileInfoExtended& extended_

AddDataTypeEntry(extended_info, data_type, equivalent_type);

std::vector<int> spatial_axes, render_axes;
int spectral_axis, stokes_axis, depth_axis;
if (_loader->FindCoordinateAxes(image_shape, spatial_axes, spectral_axis, stokes_axis, render_axes, depth_axis, message)) {
if (_loader->FindCoordinateAxes(message)) {
auto image_shape = _loader->GetShape();
auto axes = _loader->GetAxes();

casacore::Vector<casacore::String> axes_names;
AddShapeEntries(
extended_info, image_shape, spatial_axes, spectral_axis, stokes_axis, render_axes, depth_axis, axes_names);

AddShapeEntries(extended_info, image_shape, axes.spatial, axes.spectral, axes.stokes, axes.render, axes.z, axes_names);

// Computed entries for rendered image axes, depth axis (may not be spectral), stokes axis
AddComputedEntries(
extended_info, image.get(), render_axes, spectral_axis, stokes_axis, use_image_for_entries, is_history_beam);
extended_info, image.get(), axes.render, axes.spectral, axes.stokes, use_image_for_entries, is_history_beam);
info_ok = true;
}
} else { // image failed
Expand Down
Loading

0 comments on commit 5a69dcd

Please sign in to comment.