- fixed a little bug with hkl: phi limits were not properly tested
- updated powder file writing to properly work with mean and stddev
This commit is contained in:
21
nxdata.c
21
nxdata.c
@@ -1,9 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
N X D A T A
|
||||
|
||||
a module of utility functions which serve to write Nexus
|
||||
data files.
|
||||
|
||||
This implements the data file writing for the Powder diffractometers
|
||||
HRPT and DMC.
|
||||
|
||||
@@ -63,6 +60,8 @@
|
||||
#include "danu.h"
|
||||
#include "HistMem.h"
|
||||
#include "udpquieck.h"
|
||||
#include "evcontroller.h"
|
||||
|
||||
|
||||
#define DMCDETNAM "DMC-BF3-Detector"
|
||||
#define DMCDETOB "detector"
|
||||
@@ -478,7 +477,9 @@
|
||||
int32 *iTVal = NULL;
|
||||
pDummy pDum;
|
||||
int bHRPT = 0;
|
||||
|
||||
float fMean, fStdDev;
|
||||
pVarLog pLog = NULL;
|
||||
|
||||
/* open the file & entry */
|
||||
Nfil = SNXStartFile(pCon,pSics);
|
||||
if(!Nfil)
|
||||
@@ -762,7 +763,6 @@
|
||||
pMot = FindMotor(pSics,"a4");
|
||||
assert(pMot);
|
||||
iStat = MotorGetSoftPosition(pMot,pCon,&fStart);
|
||||
assert(iStat);
|
||||
iStat = SNputdata1att(Nfil,"two_theta_start",DFNT_FLOAT32,1,
|
||||
&fStart,"Units","degrees");
|
||||
if(!iStat)
|
||||
@@ -830,7 +830,16 @@
|
||||
pDrive = pDum->pDescriptor->GetInterface(pDum,DRIVEID);
|
||||
if(pDrive) /* a proper environment device */
|
||||
{
|
||||
fVal = pDrive->GetValue(pDum,pCon);
|
||||
pLog = EVCGetVarLog( (pEVControl)pCom->pData);
|
||||
if(pLog)
|
||||
{
|
||||
VarlogGetMean(pLog,&fMean,&fStdDev);
|
||||
SNputdata1att(Nfil,"temperature_mean",DFNT_FLOAT32, 1,&fMean,
|
||||
"Units","K");
|
||||
SNputdata1att(Nfil,"temperature_stddev",DFNT_FLOAT32, 1,
|
||||
&fStdDev,"Units","K");
|
||||
}
|
||||
fVal = pDrive->GetValue(pCom->pData,pCon);
|
||||
}
|
||||
else /* a simple variable */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user