Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linear moment scaling to coupe and meca #5649

Merged
merged 9 commits into from Aug 19, 2021
Merged

Conversation

PaulWessel
Copy link
Member

This PR implements Torsten Becker's suggestion of an option to scale symbol sizes proportional to moment and not just magnitude. We do this by introducing some common constants in meca.h that sets the default earthquake parameters and then use those in coupe and meca. Changing mode and setting parameters are done via new modifiers to -S. We also deprecated -M. Summary of changes:

  1. Change from magnitude to moment scaling via -S modifier +l.
  2. Set reference magnitude or moment via -S modifier +sreference.
  3. Set fixed symbol size via -S modifier +m (deprecated option -M handled via backward compatibility).
  4. Update test scripts to use the new syntax after first passing with the old syntax. All tests pass.
  5. Documentation has been updated to reflect the changes.

Currently, the default reference parameters are these (in meca.h):

#define SEIS_MAG_REFERENCE 5		/* Reference magnitude for -S */
#define SEIS_MOMENT_MANT_REFERENCE 4	/* Mantissa for reference moment for -S */
#define SEIS_MOMENT_EXP_REFERENCE 23	/* Exponent for reference moment for -S */

@seisman may revise these and possibly add corresponding SI units versions for the moment attributes so that we can upgrade the reference value to take a unit, e.g. -S...+s1e26u (for US unit or whatever).

This PR implements Torsten Becker's suggestion of an option to scale symbol sizes proportional to moment and not just magnitude.  We do this by introducing some common constants in meca.h that sets the default earthquake parameters and then use those in coupe and meca.  Changing mode and setting parameters are done via new modifiers to -S.  We also deprecated -M to be a +m modifier in S instead.
@PaulWessel PaulWessel added the supplement update PR that implements a new feature for supplement modules label Aug 15, 2021
@PaulWessel PaulWessel self-assigned this Aug 15, 2021
@PaulWessel PaulWessel changed the title WIP Add linear moment scaling to coupe and meca Add linear moment scaling to coupe and meca Aug 18, 2021
@PaulWessel
Copy link
Member Author

Successful test by Becker on the forum. Once I can add his test example this PR will be complete.

@PaulWessel
Copy link
Member Author

I have finalized this PR by addressing Becker's comments about the integer constants needing to be float, and added a new test script seis_13.sh which produces the plot below. I think we are ready for final approval:

seis_13

Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@PaulWessel PaulWessel merged commit 4329786 into master Aug 19, 2021
@PaulWessel PaulWessel deleted the seis-linear-scaling branch August 19, 2021 18:01
@maxrjones maxrjones added the add-changelog Add PR to the changelog label Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add-changelog Add PR to the changelog supplement update PR that implements a new feature for supplement modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants