src/GamIO/nrpt/Felix.cc
/* These are the functions which will output a "serial" file in Felix fomat.
   A serial file is essentialy written as block after block after block....
   without any of the Felix matrix structure.  These are typically unprocessed
   data, although they don't have to be.  In a 2D case, the date is normally
   run through a Felix macro which reads the lines successively and processes
   the result into a spectrum for display. 

           Input		filename : Output file name
           			fp       : Output file stream
           			BLK      : Output data 1D/2D block
           			data     : Output data vector/matrix
	  			rc       : Flag for real versus complex output
                                          0:real, <0:imag, >0:complex (default)
	  				   default of 1 == complex
	   Output		none     : Disk file in Felix serial format
                                           is either produced (filename input)
					   or added (file stream input)
	   Note				 : ".dat" format is equivalent for
	  				   both Felix and its predecessor
	  				   FTNMR.  Hence the file FTNMR_dat
	  				   is equivalent to this.            */
These are the functions which will output a "serial" file in Felix fomat.
A serial file is essentialy written as block after block after block
without any of the Felix matrix structure.  These are typically unprocessed
data, although they don't have to be.  In a 2D case, the date is normally
run through a Felix macro which reads the lines successively and processes
the result into a spectrum for display.


These are the functions which will output a " serial " file in Felix fomat . A serial file is essentialy written as block after block after block without any of the Felix matrix structure . These are typically unprocessed data although they don ' t have to be . In a 2D case the date is normally run through a Felix macro which reads the lines successively and processes the result into a spectrum for display .
void Felix(const string& filename, const row_vector& data, int rc)
  {
  ofstream fp;					
  fp.open(filename.c_str(), ios::out);		
  if(!fp.is_open()) 				
    {
    FelixErr(1, filename, 1);			
    FelixFatal(6);				
    }
  Felix(fp, data, rc, 1);			
  fp.close();					
  }
void Felix ( const string & filename , const row_vector & data , int rc ) { ofstream fp ; fp . open ( filename . c_str ( ) , ios :: out ) ; if ( ! fp . is_open ( ) ) { FelixErr ( 1 , filename , 1 ) ; FelixFatal ( 6 ) ; } Felix ( fp , data , rc , 1 ) ; fp . close ( ) ; }
These are the functions which will output a "serial" file in Felix fomat.
These are the functions which will output a " serial " file in Felix fomat .
// File handle // Open file filename // Insure file is OK //   Problems with file //   Can't write to file // Just use overload function // Close file filename