Skip to main content
Ctrl+K

arte 0.24.0 documentation

  • Tutorial
  • Developer Documentation
  • API Reference
  • Tutorial
  • Developer Documentation
  • API Reference

Section Navigation

  • Astronomy Module (arte.astro)
    • Astronomy Module API Reference
      • telescopes
  • Atmospheric turbulence module (arte.atmo)
    • Atmospheric Turbulence API Reference
      • cn2_profile
      • phase_screen_generator
      • utils
      • von_karman_psd
      • von_karman_covariance_calculator
  • Contributed Utilities (arte.contrib)
    • Contrib Module API Reference
      • chunk_iterator
      • daemonize
      • debug
      • if
      • interpolated_array
      • timer
      • yes_no
  • Control Systems (arte.control)
    • Control Module API Reference
      • transfer_function
  • Data Analysis Framework (arte.dataelab)
    • Data Analysis Framework API Reference
      • base_analyzer
      • base_timeseries
      • base_file_walker
      • data_loader
      • base_2dmap
      • base_slopes
      • base_data
      • base_analyzer_set
      • base_indexer
      • analyzer_plots
      • cache_on_disk
      • tag
      • unit_handler
      • dataelab_utils
  • Mathematical Utilities (arte.math)
    • Mathematical Utilities API Reference
      • factors
      • make_xy
      • masks
      • toccd
  • Miscellaneous Utilities (arte.misc)
    • Misc Module API Reference
      • fourier_adaptive_optics
  • Optical Propagation (arte.optical_propagation)
    • Optical Propagation Module API Reference
      • abstract_coronograph
      • four_quadrant_coronograph
      • lyot_coronograph
      • perfect_coronograph
      • vortex_coronograph
  • Photometry
    • Photometry Module API Reference
      • eso_sky_calc
      • expected_flux
      • filters
      • mag_estimator
      • n_phot
      • normalized_star_spectrum
      • spectral_types
      • transmissive_elements
      • transmissive_elements_catalogs
      • transmittance_calculator
  • Time Series Analysis
    • Time Series Module API Reference
      • axis_handler
      • indexer
      • multi_time_series
      • time_series
  • Data Types
    • Types Module API Reference
      • aperture
      • domainxy
      • fisba_measure
      • guide_source
      • mask
      • modal_coefficients
      • region_of_interest
      • scalar_bidimensional_function
      • slopes
      • wavefront
      • zernike_coefficients
  • Utilities
    • Utils Module API Reference
      • base_modal_decomposer
      • circular_buffer
      • constants
      • discrete_fourier_transform
      • displays
      • help
      • image_moments
      • karhunen_loeve_decomposer
      • karhunen_loeve_generator
      • logger
      • marechal
      • modal_decomposer
      • not_available
      • paste
      • radial_profile
      • rebin
      • show_array
      • tabular_report
      • timestamp
      • unit_checker
      • zernike_decomposer
      • zernike_generator
  • Wavefront Sensing (arte.wfs)
    • Wfs Module API Reference
      • sh_lenslet_parameters
  • API Reference
  • Contributed Utilities (arte.contrib)
  • Contrib Module API Reference
  • timer

timer#

class arte.contrib.timer.Timer(unit='s', precision=2, msg='')#

Bases: object

Timer context manager. Originally from https://stackoverflow.com/questions/5849800/tic-toc-functions-analog-in-python

and modified to support multiple time units

Example:

with Timer(unit=’s’, msg=’foo’, precision=2):

long_function()

result: foo: Elapsed: 33.20 s

previous

interpolated_array

next

yes_no

On this page
  • Timer
Show Source

© Copyright 2020, Arcetri Adaptive Optics.

Created using Sphinx 9.1.0.

Built with the PyData Sphinx Theme 0.17.0.