Skip to content

Improve z_order#500

Merged
teutoburg merged 4 commits intomainfrom
fh/zorder
Nov 13, 2024
Merged

Improve z_order#500
teutoburg merged 4 commits intomainfrom
fh/zorder

Conversation

@teutoburg
Copy link
Copy Markdown
Contributor

@teutoburg teutoburg commented Nov 13, 2024

As discussed in #489. Decided to make the z_order (and some afaik not-really-used) report stuff class attributes, because both are conceptually properties of the class, not the instance. This will also come in handy in the upcoming (at some point) effects -> dataclass change, because there's no point in having z_order as part of an effect's constructor.

Also, no. 500 🥳 🎉 🚀

I know, we want to get rid of z_order eventually. But that's for later.
Now, in the context of the effects dataclasses change, and the changes
to meta associated with that, I need to make this move anyway. I realized
this can be done independently, so why not. Also, conceptually, the
z_order is a property of the class, not the instance. As in, any instance
of an effect class will not change the z_order. That is, except
AtmosphericDispersionCorrection apparently, but that should work as well.
Again, these are about the whole class, rather than individual instances.
@teutoburg teutoburg added refactor Implementation improvement effects Related to a ScopeSim effect labels Nov 13, 2024
@teutoburg teutoburg self-assigned this Nov 13, 2024
@teutoburg teutoburg linked an issue Nov 13, 2024 that may be closed by this pull request
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 96.03175% with 5 lines in your changes missing coverage. Please review.

Project coverage is 73.98%. Comparing base (d4084aa) to head (8f51652).

Files with missing lines Patch % Lines
scopesim/optics/optics_manager.py 60.00% 2 Missing ⚠️
scopesim/effects/rotation.py 75.00% 1 Missing ⚠️
scopesim/effects/shifts.py 87.50% 1 Missing ⚠️
scopesim/optics/optical_element.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #500      +/-   ##
==========================================
- Coverage   76.93%   73.98%   -2.96%     
==========================================
  Files          66       66              
  Lines        8139     8210      +71     
==========================================
- Hits         6262     6074     -188     
- Misses       1877     2136     +259     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@teutoburg
Copy link
Copy Markdown
Contributor Author

Network tests fail with timeout, also after retry, I'll try again in an hour or so, but this is unrelated to the PR...

Codecov complains because I guess more covered lines were removed or something...

@teutoburg teutoburg marked this pull request as ready for review November 13, 2024 13:50
Copy link
Copy Markdown
Collaborator

@oczoske oczoske left a comment

Choose a reason for hiding this comment

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

Defining z_order as a class variable makes a lot of sense. Looks good to me.

@teutoburg teutoburg merged commit bafb2b9 into main Nov 13, 2024
@teutoburg teutoburg deleted the fh/zorder branch November 13, 2024 17:28
@teutoburg teutoburg mentioned this pull request Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effects Related to a ScopeSim effect refactor Implementation improvement

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Don't apply detector array effects twice

3 participants