Skip to content

Commit

Permalink
Fix the bug of spectral profiles for computed stokes (#1123)
Browse files Browse the repository at this point in the history
* fix the bug of spectral profiles for computed stokes

* modify the change log
  • Loading branch information
markccchiang committed Jun 20, 2022
1 parent eae1202 commit 5a1acc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Stopped calculating per-cube histogram unnecessarily when switching to a new Stokes value ([#1013](https://github.com/CARTAvis/carta-backend/issues/1013)).
* Ensured that HTTP server returns error codes correctly ([#1011](https://github.com/CARTAvis/carta-backend/issues/1011)).
* Fixed crash problems for compressed FITS files ([#999](https://github.com/CARTAvis/carta-backend/issues/999) and [#1014](https://github.com/CARTAvis/carta-backend/issues/1014)).
* Fixed incorrect spectral profiles for computed stokes ([#1122](https://github.com/CARTAvis/carta-backend/issues/1122)).

## [3.0.0-beta.3]

Expand Down
3 changes: 2 additions & 1 deletion src/Frame/Frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2211,8 +2211,9 @@ casacore::Slicer Frame::GetExportRegionSlicer(const CARTA::SaveFile& save_file_m
bool Frame::GetStokesTypeIndex(const string& coordinate, int& stokes_index) {
// Coordinate could be profile (x, y, z), stokes string (I, Q, U), or combination (Ix, Qy)
bool is_stokes_string = StokesStringTypes.find(coordinate) != StokesStringTypes.end();
bool is_combination = (coordinate.size() > 1 && (coordinate.back() == 'x' || coordinate.back() == 'y' || coordinate.back() == 'z'));

if (coordinate.size() == 2 || coordinate.size() == 3 || is_stokes_string) {
if (is_combination || is_stokes_string) {
bool stokes_ok(false);

std::string stokes_string;
Expand Down

0 comments on commit 5a1acc6

Please sign in to comment.