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 d6a81d1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 22 deletions.
29 changes: 18 additions & 11 deletions maps/src/FlatSkyMap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -567,43 +567,50 @@ FlatSkyMap::Description() const
default:
os << "unknown";
}
os << " coordinates ";
os << " coordinates";
os << " (";

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 << ", ";
os << (weighted ? "" : "not ") << "weighted";
os << ", ";
os << (flat_pol_ ? "" : "not ") << "flattened";
os << ")";

return os.str();
}

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

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 << ", ";
os << (weighted ? "" : "not ") << "weighted";
os << ")";

return os.str();
}

Expand Down

0 comments on commit d6a81d1

Please sign in to comment.