Skip to content

test - #165

Closed
domfournier wants to merge 207 commits into
mainfrom
develop
Closed

test#165
domfournier wants to merge 207 commits into
mainfrom
develop

Conversation

@domfournier

Copy link
Copy Markdown

Summary

PR Checklist

  • If this is a work in progress PR, set as a Draft PR
  • Linted my code according to the style guides.
  • Added tests to verify changes to the code.
  • Added necessary documentation to any new functions/classes following the
    expect style.
  • Marked as ready for review (if this is was a draft PR), and converted
    to a Pull Request
  • Tagged @simpeg/simpeg-developers when ready for review.

Reference issue

What does this implement/fix?

Additional information

santisoler and others added 30 commits March 6, 2025 09:09
Since zizmor is now available through conda-forge, we don't need to
install it through `pip` when creating a conda environment from
`environment.yml`.
Make `BaseDataMisfit.residual` to raise an error if the simulation
returns an array with `nan`s and/or `inf`s after calling the `dpred`
method. Add tests to check if the errors are correctly raised. Remove
error in case `BaseDataMisfit.data` is `None`: the `data` setter method
doesn't allow `BaseDataMisfit.data` to be `None`, therefore the error
will never be raised.
Remove non-supported Python versions and add latest ones.
Use shell rendering in the runtime information required in the Bug
Report Template.
Move some documentation pages like Getting Started, Examples and
Tutorials inside the User Guide. Create a new `docs/content/user-guide`
folder. Move Getting Started, Tutorials and Examples inside the new
folder. Remove the `docs/content/user_guide.rst` and replace it by a
`docs/content/user-guide/index.rst` file. Rename the `getting_started`
folder into `getting-started` (to make a consistent use of the dash in
urls). Update relevant index files, `docs/c onf.py`, `.gitignore` and
`docs/Makefile`. Configure `sphinx-redirects` so Sphinx create dummy
`.html` files for old locations of documentation pages that redirect to
the new locations. Fix link to Octocat image.
Correctly use the "bug" label in the issue template for bug reports.
Fix the number of `../` should be pre-appended to the target link to
generate the right redirect.
Assign the model before returning the Jacobian matrix. Don't use Numpy's
`dot` function: it doesn't work propertly when mixing Numpy arrays and
Scipy's sparse arrays. Use the matmul (`@`) operator instead. Add tests
that catch the bug.
Fix manual redirect for the index page of the User Guide.
Add new `get_slice` and `get_all_slices` methods to `BaseSurvey` that
mimics the behaviour of indexing `Data` objects. `get_slice` returns a
`slice` object that can be used to slice flat arrays like data or
uncertainty arrays. `get_all_slices` returns a dictionary with
source-receiver pairs as keys, and their corresponding `slice` object as
values. Optimize the implementation of these methods by working with
slices rather than Numpy arrays with indices. Add tests for the new
methods. Use `get_slice` in `Data`'s `__getitem__` and `__setitem__`
instead of the `indexing_dictionary`. Add `typing_extensions` as a
dependency for Python<3.13, and use the `deprecated` decorator to
deprecate the `index_dictionary` property.

---------

Co-authored-by: Joseph Capriotti <josephrcapriotti@gmail.com>
…g#1622)

Make the `G` property in the gravity survey to be either a 2D Numpy
array, or a `scipy.sparse.LinearOperator` if `store_sensitivities` is
set to `"forward_only"`. The `LinearOperator` is capable of performing
operations like `G @ m` and `G.T @ v` without allocating the full `G`
matrix on memory or disk. This allows `Jvec` and `Jtvec` to be called
and not allocate the full `G` matrix. The `getJ` method also returns
either a 2D Numpy array or a `LinearOperator` formed by the product
between `G` and the `rhoDeriv` as a `LinearOperator` as well.
Reimplement the `getJtJdiag` method: allow it to get the diagonal
without building `G` if `"forward_only"`, optimize the computation of
the diagonal when `G` is fully formed through `einsum`s, and fix the
cache of `gtg_diagonal` by checking the hash of the `W` argument.
Deprecate the public `gtg_diagonal` property. Extend docstrings of
relevant methods. Add tests for all the new features.

---------

Co-authored-by: Joseph Capriotti <josephrcapriotti@gmail.com>
Increase maximum number of iterations in magnetic equivalent sources
test.
#### Summary
Allows multiple locations for EM1D receivers

#### PR Checklist
* [x] If this is a work in progress PR, set as a Draft PR
* [x] Linted my code according to the [style
guides](https://docs.simpeg.xyz/latest/content/getting_started/contributing/code-style.html).
* [x] Added
[tests](https://docs.simpeg.xyz/latest/content/getting_started/contributing/testing.html)
to verify changes to the code.
* [x] Added necessary documentation to any new functions/classes
following the
expect
[style](https://docs.simpeg.xyz/latest/content/getting_started/contributing/documentation.html).
* [x] Marked as ready for review (if this is was a draft PR), and
converted
      to a Pull Request
* [x] Tagged ``@simpeg/simpeg-developers`` when ready for review.

#### Reference issue
Closes simpeg#1629

#### What does this implement/fix?
Allows for multiple locations in a single receiver for both 1D layered
FDEM and TDEM simulations (and adds some simple testing to ensure it
works).
Fix of the definition of `model` in J-related tests for the gravity
simulation: use the inverse of the mapping to define the `model` based
on the sample `densities`.
Fix typo, improve description of parameters and add some examples that
can be tested.
Avoid using `dpred` in the gravity test that might lead to confusion.
When the mapping is not a linear function, the `J @ m` is just a first
order approximation of the forward model and not equal to the `dpred`.
Extend test of the `getJ` method of the gravity simulation: test the
transpose of the `J` linear operator.
Add a new `.github/zizmor.yml` configuration file that allows zizmor to
use tags to pin the two reviewdog actions we currently use:
`reviewdog/action-flake8` and `reviewdog/action-black`.
Deprecate the `components` properties in potential field surveys. These
properties weren't returning the expected output. Since receivers within
the same survey can have different components, returning the components
of the first receiver is misleading.

---------

Co-authored-by: Joseph Capriotti <josephrcapriotti@gmail.com>
Make use of `survey.nD` instead of just using the total number of
receiver locations. Add the special case where `is_amplitude_data` is
`True`. Add tests.
Use pytest's warning filter to make tests error when running a
randomized discretize test that doesn't use a random seed.
Sets source list on potential fields receivers to the source field input
(while ensuring their is only 1 item.
Make the `G` property in the magnetic survey to be either a 2D Numpy
array, or a `scipy.sparse.LinearOperator` if `store_sensitivities` is
set to `"forward_only"`. The `LinearOperator` is capable of performing
operations like `G @ m` and `G.T @ v` without allocating the full `G`
matrix on memory or disk. This allows `Jvec` and `Jtvec` to be called
and not allocate the full `G` matrix. Overwrite the `getJ` method to
return either a 2D Numpy array or a `LinearOperator` formed by the
product between `G` and the `chiDeriv` as a `LinearOperator` as well.
Reimplement the `getJtJdiag` method: allow it to get the diagonal
without building `G` if `"forward_only"`, optimize the computation of
the diagonal when `G` is fully formed through `einsum`s, and fix the
cache of `gtg_diagonal` by checking the hash of the `W` argument. Raise
`NotImplementedError`s in some methods when `is_amplitude_data` is
`True`, specially the `"forward_only"` cases where we don't want to
allocate the `G` matrix. Extend docstrings of relevant methods. Add
tests for all the new features.
Use Numpy's RNG and ditch `unittest` in tests for depth weighting.
Overwrite the `getJ` method of the NSEM 1D finite volume simulations so
they raise a `NotImplementedError`. Add tests for the new errors.

First step towards addressing simpeg#1541.
)

Make sure we set the model when calling getJ. This will ensure that if
the model is changed, the sensitivity matrix is cleared (for nonlinear
problems) and the sensitivity recomputed. This will close simpeg#1358

---------

Co-authored-by: Santiago Soler <santisoler@fastmail.com>
Standardize the `getJ` methods of TDEM and FDEM 1D simulations so they
return a dense array instead of a dictionary with blocks of the `J`
matrix. Make the old `getJ` method private by renaming it to `_getJ`.
The new `getJ` method reuses the `_getJ` and builds the while `J` as a
dense array before returning it. Update `Jvec` and `Jtvec` so they use
the new private method. Add tests to check the behaviour of the new
public method.

---------

Co-authored-by: Santiago Soler <santisoler@fastmail.com>
Add release notes for SimPEG v0.24.0, and update the version switcher.
…peg#1665)

Adds a description and units for gravity UV component in docstrings.
sebhmg and others added 29 commits June 1, 2026 14:49
GEOPY-2898: Investigate edge cells recovered with DC2D inversions
GEOPY-2910: Reduce chunking of sensitivities for TEM inversions
GEOPY-2916: Investigate poor convergence of tipper with base station
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
GEOPY-2910: Reduce chunking of sensitivities for TEM inversions
GEOPY-2544: Add mechanics to re-start inversion if results are present in the SimPEGGroups
…WRITE counterparts

Authored using a powershell script with the help of Copilot.
…rite-secrets

DEVOPS-1033: Rename JIRA secrets to their _WRITE counterparts
@domfournier domfournier closed this Aug 9, 2026
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.