Skip to content

Commit

Permalink
Remove unused spectral and stokes axis properties from compressed fits
Browse files Browse the repository at this point in the history
  • Loading branch information
confluence committed Nov 9, 2024
1 parent 715f9c7 commit 733b5fc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/FileList/FileExtInfoLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -713,8 +713,6 @@ void FileExtInfoLoader::AddInitialComputedEntries(const std::string& hdu, CARTA:

if (compressed_fits) {
compressed_fits->SetShape(shape);
compressed_fits->SetSpectralAxis(axes.spectral); // TODO: this was set to depth axis previously -- which is correct???
compressed_fits->SetStokesAxis(axes.stokes);
}
}

Expand Down Expand Up @@ -1202,6 +1200,8 @@ void FileExtInfoLoader::AddComputedEntriesFromHeaders(
entry->set_entry_type(CARTA::EntryType::STRING);
}

std::cout << "+++++ Before if (compressed_fits); projection is " << projection << std::endl;

if (compressed_fits) {
casacore::CoordinateSystem coordsys;
auto shape = compressed_fits->GetShape();
Expand Down
2 changes: 1 addition & 1 deletion src/ImageData/CompressedFits.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using namespace carta;

CompressedFits::CompressedFits(const std::string& filename, bool support_aips_beam)
: _filename(filename), _support_aips_beam(support_aips_beam), _is_history_beam(false), _spectral_axis(-1), _stokes_axis(-1) {
: _filename(filename), _support_aips_beam(support_aips_beam), _is_history_beam(false) {
// Initialize linear transformation matrix for the direction coordinate
SetDefaultTransformMatrix();
}
Expand Down
14 changes: 0 additions & 14 deletions src/ImageData/CompressedFits.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,6 @@ class CompressedFits {
casacore::IPosition& GetShape() {
return _shape;
}
void SetSpectralAxis(int spectral_axis) {
_spectral_axis = spectral_axis;
}
void SetStokesAxis(int stokes_axis) {
_stokes_axis = stokes_axis;
}
int GetSpectralAxis() {
return _spectral_axis;
}
int GetStokesAxis() {
return _stokes_axis;
}

// File decompression
unsigned long long GetDecompressSize();
Expand Down Expand Up @@ -153,8 +141,6 @@ class CompressedFits {

casacore::Matrix<casacore::Double> _xform; // Linear transform matrix for the direction coordinate
casacore::IPosition _shape; // Image shape
int _spectral_axis; // Spectral axis from the header
int _stokes_axis; // Stokes axis from the header
};

} // namespace carta
Expand Down

0 comments on commit 733b5fc

Please sign in to comment.