Skip to content

add rotation in crust1.0 model - #43

Merged
xumi1993 merged 6 commits into
develfrom
main_jc
Jul 24, 2026
Merged

xumi1993 merged 6 commits into
develfrom
main_jc

Conversation

@JingChen-Thu

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.14286% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pytomoatt/io/crustmodel.py 52.94% 8 Missing ⚠️
pytomoatt/checkerboard.py 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds optional grid-rotation support when gridding CRUST1.0 onto the model domain, and improves robustness when reading checkerboard inputs that may lack zeta.

Changes:

  • Add an optional rotate argument to ATTModel.grid_data_crust1() and plumb it through to CrustModel.griddata().
  • Apply reverse rotation to the lat/lon grid before CRUST1.0 interpolation when rotate is provided.
  • Make Checker tolerate missing zeta in some input HDF5 models by defaulting it to zeros.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
pytomoatt/model.py Exposes rotate in the high-level CRUST1.0 gridding API and forwards it to the IO layer.
pytomoatt/io/crustmodel.py Implements optional reverse-rotation of the interpolation grid prior to CRUST1.0 lookup.
pytomoatt/checkerboard.py Makes checkerboard initialization resilient to models without a zeta dataset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pytomoatt/model.py Outdated
Comment thread pytomoatt/io/crustmodel.py
Comment thread pytomoatt/checkerboard.py Outdated
Comment thread pytomoatt/model.py
return dataset

def grid_data_crust1(self, type='vp'):
def grid_data_crust1(self, type='vp', rotate=None):
xumi1993 and others added 3 commits July 22, 2026 14:17
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@xumi1993

Copy link
Copy Markdown
Member

@JingChen-Thu I have made some changes on pythonic style. Pls try again on your cases. If no issue feedback, I will merge this PR.

@xumi1993
xumi1993 merged commit 7a6c008 into devel Jul 24, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants