Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#78 closed defect (fixed)

Add ability to compute Dip Direction

Reported by: Kevin Milner Owned by: Kevin Milner
Priority: minor Milestone:
Component: fault DB Version:
Keywords: Cc: Ned Field

Description (last modified by Kevin Milner)

Should be "Dip Direction" (done). Is it computed? How does that work? Should the user be able to override it? If the user edits the parameter, will it be recomputed at midnight? Maybe add button to recompute it.

Change History (5)

comment:1 Changed 13 years ago by Kevin Milner

Description: modified (diff)

comment:2 Changed 13 years ago by Kevin Milner

Cc: Ned Field added
Description: modified (diff)
Status: newassigned
Summary: rename "Dip LocationVector", add info textAdd ability to compute Dip Direction

Method for computing it (e-mail from Ned, 11/30/10):

Kevin,

The Aki Richards convention is described at:

http://www.opensha.org/glossary-strikeDipRake

All data in the database should already conform to this.

As for implementation, I see aveDipDir computed as:

firstLoc = faultTrace.get(0);

lastLoc = faultTrace.get(faultTrace.getNumLocations() - 1);;
LocationVector? aveDir = LocationUtils?.vector(firstLoc, lastLoc);
aveDipDirection = ( aveDir.getAzimuth() + 90 );

in both StirlingGriddedSurface? & SimpleListricGriddedSurface?.

We should document this implementation carefully.

Cheers,

Ned

comment:3 Changed 13 years ago by Ned Field

The database manager should definitely be able to override the dip direction (if they have better knowledge). In fact, the database should be clear about whether dip direction was calculated or entered by hand.

If the value is not entered by hand, then I'm not event sure the database should contain any value (as opposed to computing a derived value when asked for)

comment:4 Changed 13 years ago by Kevin Milner

Resolution: fixed
Status: assignedclosed

Finished updates (and updated application). Here are the changes:

  • renamed Dip LocationVector? to Dip Direction
  • set all dip direction values to null in the database
    • did a check for consistency with calculated values before deletion. All values but 2 matched, and those 2 were outdated values that never got updated.
  • created getDipDirection() in FaultTrace?.
    • This value simply returns getStrikeDirection() + 90.
    • updated other classes that were calculating it manually to use this new method

like before, if the DB has a value then it will be used. if there is no value, it will be computed on the fly. this computation is still done in StirlingGriddedSurface? and SimpleListricGriddedSurface? (both call FaultTrace?.getDipDirection()), and not in the DB classes.

comment:5 Changed 13 years ago by Trish

34Im3S That's way the bestest answer so far!

Note: See TracTickets for help on using tickets.