CC3DPipeline

Pre-Processing

CC3DPipeline.createPBSScripts(runid, joblist, command, time, ncores=8, ppn=8, path='clusterScripts/')[source]

Create a set of PBS scripts to run a simulation on a cluster. Each script starts with something like:

#PBS -S /bin/bash #PBS -lnodes=1:cores12:ppn=11 #PBS -lwalltime=12:00:00

If these commands are not correct or complete for the cluster you use, edit createPBS().

For each job in joblist a single line command is added to the script:

python command jobid > log/jobid.out 2> log/jobid.err &
Parameters:
  • runid (str) – identifier for the scripts
  • joblist – list of job identifiers
  • command (str) – command that runs the simulation
  • time (str) – requested walltime on the cluster (hh:mm:ss)
  • ncores (int) – numbor of cores in the requested node
  • ppn (int) – number of processers per node that will be used
  • path (str) – location where pbs scripts are saved
CC3DPipeline.createPBS(filename, time, ncores=None, ppn=None)

Create a new pbs script and add initial commands and settings.

Parameters:
  • filename (str) – filename of the new pbs script
  • time (str) – requested walltime on the cluster (hh:mm:ss)
  • ncores (int) – numbor of cores in the requested node
  • ppn (int) – number of processers per node that will be used
CC3DPipeline.addCommandToPBS(filename, command, log)

Add single line command to existing PBS script:

Parameters:
  • filename (str) – filename of the new pbs script
  • command (str) – command that runs the simulation
  • log (str) – name (with path) of the log files (without extension)
CC3DPipeline.finishPBS(filename)

Finish pbs file

Parameters:filename (str) – filename of the new pbs script

Post-Processing

CC3DPipeline.makeImages(id, trange, inpath, outpath, cm='default.ctb', gzipped=False, timestamp=False, label=False, scale=1, bc=None, fontsize=6, fieldname=None, border=True)[source]

Make images for a single simulation simulation

Parameters:
  • id (str) – simulation identifier
  • trange – list of time steps for which images are created
  • inpath (str) – path to data
  • outpath (str) – path to save images to
  • cm (str) – file containing the colormap
  • gzipped (bool) – data is gzipped
  • timestamp (bool) – add time stamp to the image
  • label (bool) – add id as label to the image
  • scale (number) – scaling of the image
  • bc – color of cell boundaries (r,g,b)
  • fontsize (int) – size of the fonts used for label and time stamp; font size will be multiplied by scale.
  • fieldname (str) – name of chemical field
  • border (bool) – cut of border pixels

See also

makeImage()

CC3DPipeline.getCompactnessForSim(id, trange, inpath, gzipped=False, border=True, outpath=None)[source]

Calculate compactness for one simulation, the compactness is in a file: outpath/id_compactness.data

Parameters:
  • id (str) – simulation identifier
  • trange – list of time steps for which the compactness is calculated
  • inpath (str) – path to data
  • gzipped (bool) – if True, data is expected to be gzipped, and stored in inpath/id/, and the output file will be gzipped and stored in outpath/id/
  • border (bool) – remove border pixels from data
  • outpath (str) – path where order parameter data will be saved, if omitted outpath = inpath

See also

getCompactness()

CC3DPipeline.getOrderParameterForSim(id, trange, inpath, radii, gzipped=False, border=True, outpath=None)[source]

Calculate orderparameters for one simulation. All order parameters are collected and saved in a file outpath/id_orderparameter.data

Parameters:
  • id (str) – simulation identifier
  • trange – list of time steps for which the order parameter is calculated
  • inpath (str) – path to data
  • radii – list of radii for wich the order parameter is calculates
  • gzipped (bool) – if True, data is expected to be gzipped, and stored in inpath/id/, and the output file will be gzipped and stored in outpath/id/
  • border (bool) – remove border pixels from data
  • outpath (str) – path where order parameter data will be saved, if omitted outpath = inpath
CC3DPipeline.getClustersForSim(id, trange, inpath, r, th, minlabsize, opendisk, mincellsize, gzipped=False, border=False, outpath=None)[source]

Calculate clusters and mean squared displacement and rotation for each cell in a simulation. For more details on clustering see the documentation of getCellClusters().

Parameters:
  • id (str) – simulation identifier
  • trange – list of time steps for which the clusters are calculated
  • inpath (str) – path to data
  • r (number) – radius for relative director field
  • th (number) – threshold value for step 1
  • minlabsize – labelled areas smaller than this value are ignored (2b)
  • opendisk (int) – disk size for opening operation (2a)
  • mincellsize (int) – minimal fraction of the cell that must be on the labelled area to be added to the cluster
  • gzipped (bool) – if True, data is expected to be gzipped, and stored in inpath/id/, and the output file will be gzipped and stored in outpath/id/
  • border (bool) – remove border pixels from data
  • outpath (str) – path where order parameter data will be saved, if omitted outpath = inpath

Table Of Contents

Previous topic

Readers

Next topic

Experiment

This Page