-
Notifications
You must be signed in to change notification settings - Fork 3
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 gsf module #303
Add gsf module #303
Conversation
I have also added a new coordinate transformation module, and all the GSF related code from the type5 branch of Pre-processing. The coordinate transformation module is required for the GSF meshgrid generator. @claudio525 I know you approved the trivial parsing code, but it now includes quite a bit more. I will also add a description of the GSF file format to the wiki because I don't think it's documented anywhere. |
qcore/coordinates.py
Outdated
nztm_coords = np.array( | ||
_WGS2NZTM.transform(wgs_depth_coordinates[:, 0], wgs_depth_coordinates[:, 1]), | ||
).T | ||
return np.append(nztm_coords, wgs_depth_coordinates[:, 2].reshape((-1, 1)), axis=-1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simplified to just
nztm_coords = np.array( _WGS2NZTM.transform(wgs_depth_coordinates[:, 0], wgs_depth_coordinates[:, 1], wgs_depth_coordinates[:, 2])).T
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments would be nice to address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy in general - just a few comments
@sungeunbae @joelridden I have addressed these concerns. I'll leave the unhappy parallel array gsf writing function for now but include a fault class into qcore that I can use in NSHMDB, Pre-Processing and any places later on where the database or type-5 code gets incorporated. That will be a separated pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just think the other 2 comments for the coordinates.py functions would be good to simplify
qcore/coordinates.py
Outdated
nztm_coords = np.array( | ||
_WGS2NZTM.transform(wgs_depth_coordinates[:, 0], wgs_depth_coordinates[:, 1]), | ||
).T | ||
return np.append(nztm_coords, wgs_depth_coordinates[:, 2].reshape((-1, 1)), axis=-1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments would be nice to address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor last minute comments. Otherwise looks great to me.
0899004
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
@claudio525 Mentioned that the parsing code in ucgmsim/visualization#91 may have broader application and so should be included in qcore. I agree, so this pull request contains the GSF parsing code.