Skip to content

Adding new eccentricity definitions

Md Arif Shaikh edited this page Feb 14, 2023 · 5 revisions

Documentation on adding new eccentricity definitions.

Adding a new eccentricity definition

All eccentricity definitions should be added to the gw_eccentricity directory.
Please follow the following conventions

  • New classes should be derived from eccDefinition in eccDefinition.py, or one of its derived classes (like eccDefinitionUsingAmplitude).
  • The new class should be named eccDefinitionUsingMethod where Method is a suitable keyword for your method.
  • Once implemented, the new method should be added to the get_available_methods() function in the gw_eccentricity.py wrapper.
  • See gw_eccentricity_demo.ipynb for how to use various different methods.

Adding a definition based on peaks and troughs in the omega

If your definition is based on using the frequency (omega) at the peaks and troughs, you just need to do the following.

  • Override the find_extrema() member function to use whichever method you want to use to find the locations of peaks/troughs.

Adding a general definition

If the definition you are using does not depend on the extrema in the omega, then:

  • Override the measure_ecc member function to use your method of measuring eccentricity.