cosmetic in the musrview legend concerning the units

This commit is contained in:
nemu 2011-05-05 12:34:32 +00:00
parent 2fe5c035e5
commit 89ea4cb63f
3 changed files with 21 additions and 5 deletions

View File

@ -12,6 +12,7 @@ FIXED bug reported in MUSR-183: missing background for 2nd histo in asymmetry fi
FIXED Makefiles so that the NeXus support will not be built if it has not been enabled during the configure stage
FIXED ASCII export from musrview in case of a Fourier-Power- or Fourier-Phase-difference plot
FIXED bug in asymmetry fit with fixed background
CHANGED cosmetics in the musrview legend concerning the units
CHANGED the user-function dependency from libPMusr to libPUserFcnBase
musrfit 0.9.0 - changes since 0.8.0

View File

@ -749,8 +749,13 @@ void PMusrCanvas::UpdateInfoPad()
if (dval == PMUSR_UNDEFINED) {
tstr += TString("??,");
} else {
if (dval < 1.0e4) { // Gauss makes sense as a unit
sprintf(sval, "%0.2lf", dval);
tstr += TString(sval) + TString("G,");
} else { // Tesla makes sense as a unit
sprintf(sval, "%0.2lf", dval/1.0e4);
tstr += TString(sval) + TString("T,");
}
}
// energy if present
tstr += TString("E=");
@ -758,8 +763,13 @@ void PMusrCanvas::UpdateInfoPad()
if (dval == PMUSR_UNDEFINED) {
tstr += TString("??,");
} else {
if (dval < 1.0e3) { // keV makes sense as a unit
sprintf(sval, "%0.2lf", dval);
tstr += TString(sval) + TString("keV,");
} else { // MeV makes sense as a unit
sprintf(sval, "%0.2lf", dval/1.0e3);
tstr += TString(sval) + TString("MeV,");
}
}
// setup if present
tstr += fRunList->GetSetup(*runs[runNo].GetRunName());

View File

@ -1679,9 +1679,14 @@ Bool_t PRunDataHandler::ReadPsiBinFile()
runData.SetEnergy(PMUSR_UNDEFINED);
runData.SetTransport(PMUSR_UNDEFINED);
// get field
Double_t scale = 0.0;
if (psiBin.get_field().find("G"));
scale = 1.0;
if (psiBin.get_field().find("T"));
scale = 1.0e4;
status = sscanf(psiBin.get_field().c_str(), "%lfG", &dval);
if (status == 1)
runData.SetField(dval);
runData.SetField(scale*dval);
// get temperature
PDoubleVector tempVec(psiBin.get_temperatures_vector());
PDoubleVector tempDevVec(psiBin.get_devTemperatures_vector());