Skip to content
Snippets Groups Projects
Commit 951a9b15 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

auxiliary files .lssrc, needed by my script lssrc to list all human-written source files

parent 34847bd3
No related branches found
No related tags found
No related merge requests found
# -*- mode: python -*-
# Include file for program lssrc.
# Returns user-written source files.
import glob, re
def source_files(root,ext):
fnames = []
# get all files with right extension from pwd
for e in ext:
fnames += sorted( glob.glob( root+"*/*."+e ) )
# remove files known to be machine generated
out = list(fnames)
for f in fnames:
if re.search( r'\.pypp\.', f ):
out.remove( f )
return out
# -*- mode: python -*-
# Include file for program lssrc.
# Returns user-written source files.
import glob, re
def source_files(root,ext):
fnames = []
# get all files with right extension from pwd
for e in ext:
fnames += sorted( glob.glob( root+"*/*/*."+e ) )
# remove files known to be machine generated
out = list(fnames)
for f in fnames:
if re.search( r'\.pypp\.', f ):
out.remove( f )
return out
...@@ -25,36 +25,50 @@ ...@@ -25,36 +25,50 @@
namespace OutputDataFunctions namespace OutputDataFunctions
{ {
//! double the bin size for each dimension //! double the bin size for each dimension
OutputData<double> *doubleBinSize(const OutputData<double>& source); OutputData<double> *doubleBinSize(const OutputData<double>& source);
//! unnormalized Fourier transformation for real data //! unnormalized Fourier transformation for real data
void FourierTransform(const OutputData<double>& source, OutputData<complex_t> *p_destination); void FourierTransform(
const OutputData<double>& source, OutputData<complex_t> *p_destination);
//! unnormalized reverse Fourier transformation for real data //! unnormalized reverse Fourier transformation for real data
void FourierTransformR(const OutputData<complex_t>& source, OutputData<double> *p_destination); void FourierTransformR(
const OutputData<complex_t>& source, OutputData<double> *p_destination);
OutputData<double> *getRealPart(const OutputData<complex_t>& source); OutputData<double> *getRealPart(const OutputData<complex_t>& source);
OutputData<double> *getImagPart(const OutputData<complex_t>& source); OutputData<double> *getImagPart(const OutputData<complex_t>& source);
OutputData<double> *getModulusPart(const OutputData<complex_t>& source); OutputData<double> *getModulusPart(const OutputData<complex_t>& source);
//! Slice data, having one bin on selected axis fixed. Resulting output data will have one axis less (without axis 'fixed_axis_name') //! Slice data, having one bin on selected axis fixed. Resulting output data will have one axis less (without axis 'fixed_axis_name')
OutputData<double> *sliceAccrossOneAxis(const OutputData<double >& data, const std::string& fixed_axis_name, double fixed_axis_value); OutputData<double> *sliceAccrossOneAxis(
const OutputData<double>& data, const std::string& fixed_axis_name,
double fixed_axis_value);
//! Select range on one of the axis. Resulting output data will have same number of axes //! Select range on one of the axis. Resulting output data will have same number of axes
OutputData<double> *selectRangeOnOneAxis(const OutputData<double >& data, const std::string& selected_axis_name, double axis_value1, double axis_value2); OutputData<double> *selectRangeOnOneAxis(
const OutputData<double>& data, const std::string& selected_axis_name,
double axis_value1, double axis_value2);
//! apply intensity function to values stored in output data //! apply intensity function to values stored in output data
void applyFunction(OutputData<double>& data, const IIntensityFunction *func); void applyFunction(
OutputData<double>& data, const IIntensityFunction *func);
//! Creates a rectangular mask based on the given OutputData object and limits //! Creates a rectangular mask based on the given OutputData object and limits
Mask *CreateRectangularMask(const OutputData<double>& data, const double *minima, const double *maxima); Mask *CreateRectangularMask(
Mask *CreateRectangularMask(const OutputData<double>& data, double x1, double y1, double x2, double y2); const OutputData<double>& data,
const double *minima, const double *maxima);
Mask *CreateRectangularMask(
const OutputData<double>& data,
double x1, double y1, double x2, double y2);
//! Creates a elliptic mask based on the given OutputData object and limits //! Creates a elliptic mask based on the given OutputData object and limits
Mask *CreateEllipticMask(const OutputData<double>& data, const double *center, const double *radii); Mask *CreateEllipticMask(
Mask *CreateEllipticMask(const OutputData<double>& data, double xc, double yc, double rx, double ry); const OutputData<double>& data,
const double *center, const double *radii);
Mask *CreateEllipticMask(
const OutputData<double>& data,
double xc, double yc, double rx, double ry);
} }
#endif // OUTPUTDATAFUNCTIONS_H #endif // OUTPUTDATAFUNCTIONS_H
......
# -*- mode: python -*-
# Include file for program lssrc.
# Returns user-written source files.
import glob, re
def source_files(root,ext):
fnames = []
# get all files with right extension from pwd
for e in ext:
fnames += sorted( glob.glob( root+"TestCore/*/*."+e ) )
fnames += sorted( glob.glob( root+"TestFit/*/*."+e ) )
# remove files known to be machine generated
out = list(fnames)
for f in fnames:
if re.search( r'\.pypp\.', f ):
out.remove( f )
return out
# -*- mode: python -*-
# Include file for program lssrc.
# Returns user-written source files.
import glob, re
def source_files(root,ext):
fnames = []
# get all files with right extension from pwd
for e in ext:
fnames += sorted( glob.glob( root+"*."+e ) )
# remove files known to be machine generated
out = list(fnames)
for f in fnames:
if re.search( r'\.pypp\.', f ):
out.remove( f )
return out
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment