src/GamIO/XWinSer.cc
/* These functions will write an FID or series of FIDs to a file in Bruker
   XWinNMR format. This can be done either by directly writing a row vector
   or matrix into such a file, or by writing a series of row vectors. Note that
   ususally there is a parameter file associated with such data files, called
   acqus in the case of a single FID file or called acqu2s for a serial file
   file of multiple FIDs. NOTE: The input data from GAMMA (row_vector or
   matrix) contains double precision numbers which are converted to long
   integers. Any numbers of magnidude less than 1 will become zero.  Thus
   it is very wise to SCALE THE INPUT DATA (~10^6 - ~10^8) so that one will
   not loose any informaton prior to output in Bruker format               .*/
These functions will write an FID or series of FIDs to a file in Bruker
XWinNMR format. This can be done either by directly writing a row vector
or matrix into such a file, or by writing a series of row vectors. Note that
ususally there is a parameter file associated with such data files, called
acqus in the case of a single FID file or called acqu2s for a serial file
file of multiple FIDs. NOTE: The input data from GAMMA (row_vector or
matrix) contains double precision numbers which are converted to long
integers. Any numbers of magnidude less than 1 will become zero.  Thus
it is very wise to SCALE THE INPUT DATA (~10^6 - ~10^8) so that one will
not loose any informaton prior to output in Bruker format               .
These functions will write an FID or series of FIDs to a file in Bruker XWinNMR format . This can be done either by directly writing a row vector or matrix into such a file or by writing a series of row vectors . Note that ususally there is a parameter file associated with such data files called acqus in the case of a single FID file or called acqu2s for a serial file file of multiple FIDs . NOTE : The input data from GAMMA ( row_vector or matrix ) contains double precision numbers which are converted to long integers . Any numbers of magnidude less than 1 will become zero . Thus it is very wise to SCALE THE INPUT DATA ( ~10^6 - ~10^8 ) so that one will not loose any informaton prior to output in Bruker format .
int XWinSer::write(const std::string& fout, const row_vector& data, int warn)
  {
  bool bord = WeRBigEnd();			
  int TD = 2*data.size();			
  XWinSer XA(fout,TD,bord,std::ios::binary|std::ios::out);
  int TF = XA.write(data);			
  ffp.close();					
  return TF;
  }
int XWinSer :: write ( const std :: string & fout , const row_vector & data , int warn ) { bool bord = WeRBigEnd ( ) ; int TD = 2 * data . size ( ) ; XWinSer XA ( fout , TD , bord , std :: ios :: binary | std :: ios :: out ) ; int TF = XA . write ( data ) ; ffp . close ( ) ; return TF ; }
These functions will write an FID or series of FIDs to a file in Bruker
XWinNMR format.
These functions will write an FID or series of FIDs to a file in Bruker XWinNMR format .
// Our byte order  // FID point size // Open Bruker serial file // Write vector to file // Close the file