Skip to content

Commit

Permalink
More informative sky map descriptions
Browse files Browse the repository at this point in the history
Add weighting and flattening status to FlatSkyMap and HealpixSkyMap descriptions.
  • Loading branch information
arahlin committed Nov 14, 2023
1 parent 0a56335 commit b16d185
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 22 deletions.
25 changes: 14 additions & 11 deletions maps/src/FlatSkyMap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -567,43 +567,46 @@ FlatSkyMap::Description() const
default:
os << "unknown";
}
os << " coordinates ";
os << " coordinates (";

switch (units) {
case G3Timestream::Counts:
os << " (Counts)";
os << "Counts";
break;
case G3Timestream::Current:
os << " (Current)";
os << "Current";
break;
case G3Timestream::Power:
os << " (Power)";
os << "Power";
break;
case G3Timestream::Resistance:
os << " (Resistance)";
os << "Resistance";
break;
case G3Timestream::Tcmb:
os << " (Tcmb)";
os << "Tcmb";
break;
case G3Timestream::Angle:
os << " (Angle)";
os << "Angle";
break;
case G3Timestream::Distance:
os << " (Distance)";
os << "Distance";
break;
case G3Timestream::Voltage:
os << " (Voltage)";
os << "Voltage";
break;
case G3Timestream::Pressure:
os << " (Pressure)";
os << "Pressure";
break;
case G3Timestream::FluxDensity:
os << " (FluxDensity)";
os << "FluxDensity";
break;
default:
break;
}

os << ", " << (weighted ? "" : "not ") << "weighted";
os << ", " << (flat_pol_ ? "" : "not ") << "flattened)";

return os.str();
}

Expand Down
24 changes: 13 additions & 11 deletions maps/src/HealpixSkyMap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -869,43 +869,45 @@ HealpixSkyMap::Description() const
default:
os << "unknown";
}
os << " coordinates ";
os << " coordinates (";

switch (units) {
case G3Timestream::Counts:
os << " (Counts)";
os << "Counts";
break;
case G3Timestream::Current:
os << " (Current)";
os << "Current";
break;
case G3Timestream::Power:
os << " (Power)";
os << "Power";
break;
case G3Timestream::Resistance:
os << " (Resistance)";
os << "Resistance";
break;
case G3Timestream::Tcmb:
os << " (Tcmb)";
os << "Tcmb";
break;
case G3Timestream::Angle:
os << " (Angle)";
os << "Angle";
break;
case G3Timestream::Distance:
os << " (Distance)";
os << "Distance";
break;
case G3Timestream::Voltage:
os << " (Voltage)";
os << "Voltage";
break;
case G3Timestream::Pressure:
os << " (Pressure)";
os << "Pressure";
break;
case G3Timestream::FluxDensity:
os << " (FluxDensity)";
os << "FluxDensity";
break;
default:
break;
}

os << ", " << (weighted ? "" : "not ") << "weighted)";

return os.str();
}

Expand Down

0 comments on commit b16d185

Please sign in to comment.