Particle Identification and Tracking
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tracking::Track_shelf Class Reference

Top level class for holding the track boxes. More...

#include <track_shelf.h>

+ Collaboration diagram for tracking::Track_shelf:

Public Member Functions

void add_new_track (particle_track *first_part)
 Add a track to the shelf starting from a particle. More...
 
void add_track (Track_box *track)
 adds a pointer to a track_box to the shelf. More...
 
void remove_short_tracks (int min_length)
 Removes all tracks from the shelf that are shorter than n. More...
 
void print ()
 Print Track_shelf to stdout. More...
 
void set_shelf ()
 Sets all of the particles in shelf to their respective wrappers. More...
 
void track_length_histogram (utilities::Histogram &in)
 Generates a histogram of the lengths of all the tracks in the Track_shelf. More...
 
void msd (std::vector< double > &msd_vec, std::vector< int > &entry_count) const
 Generates the MSD plot for all the tarcks in this shelf. More...
 
void msd_corrected (utilities::Counted_vector &msd) const
 Generates the corrected MSD plot for all the tarcks in this shelf. More...
 
void msd_corrected (utilities::Counted_vector &md, utilities::Counted_vector &msd, utilities::Counted_vector &msd_sq) const
 Generates the corrected MSD, mean displacement and <|d|^4> plot for all the tarcks in this shelf. More...
 
void disp_sq_hist (int time_step, utilities::Histogram &disp_sq_hist) const
 generates a histogram of the squared displacement of the specified time step More...
 
void set_raw_disp_to_cell (utilities::Cell &output) const
 sets the tracks into the cell that is passed in More...
 
void set_corrected_disp_to_cell (utilities::Cell &output) const
 sets the corrected tracks into the cell that is passed in More...
 
unsigned int get_track_count () const
 returns the number of tracks in shelf More...
 
void pass_fun_to_track (void(Track_box::*fun)() const) const
 Pass a function to all of the Track_box objects contained. More...
 
void output_to_wrapper (utilities::Wrapper_out &wrapper) const
 Outputs the particles in a track-centric format. More...
 
void output_to_wrapper (utilities::Generic_wrapper &wrapper, const utilities::Md_store *md_store) const
 This function assumes that the tracks have been renumbered, such that the pigeon hole principle applies. More...
 
void output_link_to_wrapper (utilities::Wrapper_out &wrapper, const utilities::Tuple< float, 3 > &scale_t, const utilities::Tuple< float, 3 > &dim) const
 outputs the contents of the shelf treating each track as a single particle. More...
 
void split_to_parts (Track_shelf &out_put_shelf)
 Splits all the tracks in the self in to sections that represent single particles when the tracking is linking between z-planes. More...
 
void renumber ()
 Renumbers the tracks sequentially. More...
 
void init (Master_box &mb)
 Initializes the tracks in the track shelf based on read in trakid. More...
 
void init (hash_case &hc)
 Initializes the tracks in the track shelf based on read in trakid. More...
 
void compute_corrected_TA (Trk_accumulator &ta) const
 Shove data in to a track accumulator. More...
 
void compute_corrected_TA_ncuts (Trk_accumulator &ta, int min_neighbors, int max_neighbors) const
 Shove data in to a track accumulator, makes cuts based on the number of neighbors a particles has. More...
 
Track_boxget_track (unsigned int track_id) const
 Returns a pointer to track with id track_id. More...
 
 Track_shelf ()
 Constructor. More...
 
 ~Track_shelf ()
 Destructor. Destroys all of the tracks contained in the shelf. More...
 

Protected Member Functions

void remove_track_internal_ (std::list< Track_box * >::iterator it)
 internal private function to do track removal to make maintianign code simpler More...
 

Protected Attributes

std::list< Track_box * > tracks_
 list to keep track of all the created tracks. More...
 
unsigned int track_count_
 number of tracks in the self More...
 

Detailed Description

Top level class for holding the track boxes.

(which are the head of the linked lists made of particle_track objects).

Constructor & Destructor Documentation

tracking::Track_shelf::Track_shelf ( )
inline

Constructor.

Track_shelf::~Track_shelf ( )

Destructor. Destroys all of the tracks contained in the shelf.

References tracks_.

Member Function Documentation

void Track_shelf::add_new_track ( particle_track first_part)

Add a track to the shelf starting from a particle.

Parameters
first_partThe first particle in the track

References track_count_, and tracks_.

Referenced by tracking::hash_case::link(), tracking::track_list::link_pairs(), and tracking::track_list::trivial_bonds().

void Track_shelf::add_track ( Track_box track)

adds a pointer to a track_box to the shelf.

The shelf takes responsibility for deleting the track when done.

References track_count_, and tracks_.

Referenced by tracking::hash_case::init(), init(), and tracking::Track_box::split_to_parts().

void Track_shelf::compute_corrected_TA ( Trk_accumulator ta) const
void Track_shelf::compute_corrected_TA_ncuts ( Trk_accumulator ta,
int  min_neighbors,
int  max_neighbors 
) const
void Track_shelf::disp_sq_hist ( int  time_step,
utilities::Histogram disp_sq_hist 
) const

generates a histogram of the squared displacement of the specified time step

Parameters
time_stepinteger greater than zero less than maximum track length
disp_sq_histhistogram to be filled. Is not cleared.
Deprecated:
This computation should be done with a Trk_accumulator

References utilities::Histogram::add_data_point(), tracking::particle_track::distancesq_corrected(), tracking::particle_track::step_forwards(), and tracks_.

Referenced by main().

Track_box * Track_shelf::get_track ( unsigned int  track_id) const

Returns a pointer to track with id track_id.

raises runtime_error of track not found

Parameters
[in]track_idthe id of the track to return

References tracks_.

unsigned int tracking::Track_shelf::get_track_count ( ) const
inline

returns the number of tracks in shelf

References track_count_.

Referenced by main().

void Track_shelf::init ( Master_box mb)
void Track_shelf::init ( hash_case hc)
void Track_shelf::msd ( std::vector< double > &  msd_vec,
std::vector< int > &  entry_count 
) const

Generates the MSD plot for all the tarcks in this shelf.

Deprecated:
This computation should be done with a Trk_accumulator

References tracking::particle_base::distancesq(), tracking::particle_track::step_forwards(), and tracks_.

void Track_shelf::msd_corrected ( utilities::Counted_vector msd) const
void Track_shelf::msd_corrected ( utilities::Counted_vector md,
utilities::Counted_vector msd,
utilities::Counted_vector msd_sq 
) const

Generates the corrected MSD, mean displacement and <|d|^4> plot for all the tarcks in this shelf.

Deprecated:
This computation should be done with a Trk_accumulator

References utilities::Counted_vector::batch_add_to_element(), tracking::particle_track::distancesq_corrected(), utilities::Counted_vector::get_length(), tracking::particle_track::step_forwards(), and tracks_.

void Track_shelf::output_link_to_wrapper ( utilities::Wrapper_out wrapper,
const utilities::Tuple< float, 3 > &  scale_t,
const utilities::Tuple< float, 3 > &  dim 
) const

outputs the contents of the shelf treating each track as a single particle.

for use with 3D linking. This should be sub-classed

References utilities::Wrapper_out::add_meta_data_root(), utilities::Wrapper_out::close_group(), utilities::Wrapper_out::open_group(), utilities::Wrapper_out::set_all_values(), track_count_, and tracks_.

Referenced by main().

void Track_shelf::output_to_wrapper ( utilities::Wrapper_out wrapper) const

Outputs the particles in a track-centric format.

Assumes that the wrapper is already initialized.

Parameters
wrapperoutput wrapper, already initialized

References tracks_.

Referenced by main().

void Track_shelf::output_to_wrapper ( utilities::Generic_wrapper wrapper,
const utilities::Md_store md_store 
) const
void Track_shelf::pass_fun_to_track ( void(Track_box::*)() const  fun) const

Pass a function to all of the Track_box objects contained.

References tracks_.

void Track_shelf::print ( )

Print Track_shelf to stdout.

References tracks_.

Referenced by main().

void Track_shelf::remove_short_tracks ( int  min_length)

Removes all tracks from the shelf that are shorter than n.

This does not clear the link information in the particle_track objects.

Parameters
min_lengththe minimum length of tracks left in the shelf after

References remove_track_internal_(), and tracks_.

Referenced by main().

void Track_shelf::remove_track_internal_ ( std::list< Track_box * >::iterator  it)
protected

internal private function to do track removal to make maintianign code simpler

References track_count_, and tracks_.

Referenced by remove_short_tracks().

void Track_shelf::renumber ( )

Renumbers the tracks sequentially.

Track id numbers are only used when outputting the tracks.

References tracks_.

Referenced by main().

void tracking::Track_shelf::set_corrected_disp_to_cell ( utilities::Cell &  output) const

sets the corrected tracks into the cell that is passed in

void tracking::Track_shelf::set_raw_disp_to_cell ( utilities::Cell &  output) const

sets the tracks into the cell that is passed in

void tracking::Track_shelf::set_shelf ( )

Sets all of the particles in shelf to their respective wrappers.

void Track_shelf::split_to_parts ( Track_shelf out_put_shelf)

Splits all the tracks in the self in to sections that represent single particles when the tracking is linking between z-planes.

References tracks_.

Referenced by main().

void Track_shelf::track_length_histogram ( utilities::Histogram in)

Generates a histogram of the lengths of all the tracks in the Track_shelf.

References utilities::Histogram::add_data_point(), and tracks_.

Referenced by main().

Member Data Documentation

unsigned int tracking::Track_shelf::track_count_
protected
std::list<Track_box*> tracking::Track_shelf::tracks_
protected

list to keep track of all the created tracks.

The shelf is responsible for cleaning up the tracks at the end. A list is used so that addition/removal is fast. Random access isn't important. Tracks can now be renumbered.

Referenced by add_new_track(), add_track(), compute_corrected_TA(), compute_corrected_TA_ncuts(), disp_sq_hist(), get_track(), init(), msd(), msd_corrected(), output_link_to_wrapper(), output_to_wrapper(), pass_fun_to_track(), print(), remove_short_tracks(), remove_track_internal_(), renumber(), split_to_parts(), track_length_histogram(), and ~Track_shelf().


The documentation for this class was generated from the following files: