Commit 0018baf9 authored by flechsig's avatar flechsig
Browse files

minor modifications

parent cd8c1a81
// Time-stamp: <05 Mar 19 16:39:36 flechsig>
// Time-stamp: <13 Mar 19 16:34:58 flechsig>
/*
* NDPluginXGI.cpp
*
......@@ -282,21 +282,19 @@ void NDPluginXGI::processCallbacks(NDArray *pArray)
if (arrayCallbacks) {
for (int i = 0; i < XGI_MAX_OUTPUT; i++) {
Matrix *m = NULL;
switch (i) {
/* Profile */
case 0: m = &(output.hp); break;
/* Amplitude */
case 1: m = &(output.amp); break;
/* Wrapped Phase */
case 2: m = &(output.dphi_wrap); break;
/* Unwrapped Phase */
case 3: m = &(output.dphi_unwrap); break;
default: continue;
}
switch (i) // set pointer
{
case 0: m = &(output.hp); break; // Profile
case 1: m = &(output.amp); break; // Amplitude
case 2: m = &(output.dphi_wrap); break; // Wrapped Phase
case 3: m = &(output.dphi_unwrap); break; // Unwrapped Phase
default: continue;
}
if (this->pArrays[i]) this->pArrays[i]->release();
this->pArrays[i] = matrixToNDArray(m);
this->pArrays[i] = matrixToNDArray(m); // fills data from pointer into field
if (this->pArrays[i] == NULL) continue;
/* Copy time stamp and uniqueId from input array */
this->pArrays[i]->uniqueId = pArray->uniqueId;
this->pArrays[i]->timeStamp = pArray->timeStamp;
......@@ -317,7 +315,7 @@ void NDPluginXGI::processCallbacks(NDArray *pArray)
doCallbacksFloat64Array(output.laxis.data, output.laxis.width*output.laxis.height, XGIPluginProfileAxis, 0);
doCallbacksFloat64Array(output.hp.data, output.hp.width*output.hp.height, XGIPluginProfileData, 0);
callParamCallbacks();
}
} // end processCallbacks
/** Called when asyn clients call pasynOctet->write().
......@@ -389,14 +387,13 @@ NDArray *NDPluginXGI::matrixToNDArray(const Matrix *matrix)
static const char *functionName = "matrixToNDArray";
NDArray *pArrayOut = this->pNDArrayPool->alloc(ndims, dims, dataType, dataSize, NULL);
if (pArrayOut != NULL) {
memcpy(pArrayOut->pData, matrix->data, dataSize);
} else {
asynPrint(pasynUserSelf, ASYN_TRACE_ERROR,
if (pArrayOut != NULL)
memcpy(pArrayOut->pData, matrix->data, dataSize);
else
asynPrint(pasynUserSelf, ASYN_TRACE_ERROR,
"%s:%s alloc NDArray error\n",
driverName, functionName);
}
return pArrayOut;
} // end NDPluginXGI::matrixToNDArray
......
// File : /afs/psi.ch/user/f/flechsig/git/WFI/src/algorithms.cpp
// Date : <11 Feb 19 10:02:46 flechsig>
// Time-stamp: <05 Mar 19 17:06:13 flechsig>
// Time-stamp: <13 Mar 19 16:41:05 flechsig>
// Author : Flechsig Uwe, uwe.flechsig&#64;psi.&#99;&#104;
#include <iostream>
......@@ -874,7 +874,7 @@ void myoverlay(Matrix *put_in, struct ConfigStruct *cstp, struct Xgi_out *put_ou
put_in->copy(m); // copy input to output in field amp, address= 1
data= m->data; // Array address= 1
cout << "put myoverlay to amp @ (row, col, val) " << row0 << ", " << col0 << ", " << val << endl;
cout << "put myoverlay to OutPhase @ (row, col, val) " << row0 << ", " << col0 << ", " << val << endl;
row0= rows- row0; // plot at bottom
......
// File : /afs/psi.ch/user/f/flechsig/phase/src/phaseqt/unwrap_phase.cpp
// Date : <26 Mar 14 09:31:57 flechsig>
// Time-stamp: <13 Mar 19 09:38:14 flechsig>
// Time-stamp: <13 Mar 19 10:07:02 flechsig>
// Author : Uwe Flechsig, uwe.flechsig&#64;psi.&#99;&#104;
// $Source: /cvs/X/OL/WFI/src/unwrap_phase.cpp,v $
......@@ -278,7 +278,9 @@ yes_no find_pivot(EDGE *left, EDGE *right, double *pivot_ptr)
}
return no;
}
#ifdef DEBUG
cout << "!!! ERROR: this code should never be reached !!!" << endl;
#endif
return no; // default to avoid compiler warning
} // end find pivot
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment