core.temporalpoints module

class IMTreatment.core.temporalpoints.TemporalPoints[source]

Bases: object

Class representing a set of time evolving points.

add_pts(pt, time=0.0, unit_times='')[source]

Add a Pointsobject to the existing point set.

Parameters:
  • pt (Point object) – The points to add.
  • time (number) – time associated to the field.
  • unit_time (Unum object) – time unit.
change_unit(axe, new_unit)[source]

Change the unit of an axe.

Parameters:
  • axe (string) – ‘y’ for changing the profile y axis unit ‘x’ for changing the profile x axis unit ‘values’ for changing values unit ‘time’ for changing time unit
  • new_unit (Unum.unit object or string) – The new unit.
copy()[source]

Return a copy of the velocityfields

crop(intervx=None, intervy=None, intervv=None, intervt=None, full_output=False, ind=False, inplace=False)[source]

Return a croped field in respect with given intervals.

Parameters:
  • intervx (array, optional) – interval wanted along x
  • intervy (array, optional) – interval wanted along y
  • intervv (array, optional) – interval wanted along v
  • intervt (array, optional) – interval wanted along time
  • full_output (boolean, optional) – If ‘True’, cutting indices are also returned
  • inplace (boolean, optional) – If ‘True’, fields are croped in place.
display(sharecb=True, buffer_size=100, cpkw={})[source]

Create a windows to display temporals point sets, controlled by buttons.

Parameters:
  • sharecb (boolean) – Do all the vector field serie has to share the same colorbar or not.
  • buffer_size (number) – Number of displays to keep in memory (faster, but use memory).
  • cpkw (dict) – Drawing argument for points
  • control (Display) –
  • ---------------
  • display can be controlled using the button, but also the keyboard (The) –
  • right arrow or + (space,) –
  • left arrow or - (backspace,) –
  • arrow (down) –
  • arrow
  • + enter (number) –
  • p (play the animated fields) –
  • + i (number) –
  • + t (number) –
  • q (close) –
  • s (save an image) –
dt
remove_pts(indice)[source]

Remove points of the existing point set.

Parameters:indice (integer or list of integers) – Point indice(s) to remove.
scale(scalex=None, scaley=None, scalev=None, scalet=None, inplace=False)[source]

Scale the point sets.

Parameters:
  • scaley, scalev (scalex,) – Scale for the axis and the values.
  • inplace (boolean) –

    .

smooth(tos='gaussian', size=None, inplace=False, **kw)[source]

Return a smoothed points field set.

Parameters:
  • tos (string, optional) – Type of smoothing, can be ‘uniform’, ‘gaussian’ (default) or ‘lowpass’.
  • size (number, optional) – radius of the smoothing for ‘uniform’, radius of the smoothing for ‘gaussian’, cut off frequency for ‘lowpass’ Default are 3 for ‘uniform’, 1 for ‘gaussian’ and 0.1 for ‘ lowpass’.
  • inplace (boolean) – If ‘False’, return a smoothed points field else, smooth in place.
  • kw (dic) – Additional parameters for ndimage methods (See ndimage documentation)
times
unit_times
unit_x
unit_y