Skip to content
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

Features/alignment optimization #96

Open
wants to merge 66 commits into
base: main
Choose a base branch
from

Conversation

MarleneBusch
Copy link
Collaborator

Features/alignment optimization

This branch mainly introduces the AlignmentOptimizer that can be used to optimize all 28 heliostat kinematic parameters. There are two optimization methods, one uses the motor positions and the other uses raytracing. Optimizing via the motor positions is significantly faster and also more accurate.

This branch also changed other modules.

  • The tutorials were not updated in my last feature branch concerning the device, now the default device is also set there.
  • The h5 scenarios were updated to also include the power plant position coordinates.
  • The actuator used to have a forward method that had no use, i removed it.
  • The kinematic module variable names were not consistent, we used to have actuator_steps, motor_steps, actuator_pos, ... all were referring to the same thing that is named motor_positions in PAINT, thats why I chose that name for ARTIST as well.
  • A new pytest is introduced checking the util method that converts wgs84 to enu.
  • In the heliostat module, the get_surface_points_and_surface_normals method was moved from the alignement method to the init. This way it is only called once and not with each new alignment.
  • Inplace operations in the kinematic and raytracing were removed to make the modules differentiable.
  • A PAINT_to_surface converter was added to use PAINT data and create scenarios from it.
  • Overall I also found pieces of code that used the math library, I changed that to torch.

Fixes #91

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.17%. Comparing base (ac85e26) to head (47e6936).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
+ Coverage   96.57%   97.17%   +0.59%     
==========================================
  Files          27       28       +1     
  Lines        1140     1310     +170     
==========================================
+ Hits         1101     1273     +172     
+ Misses         39       37       -2     

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


🚨 Try these New Features:

…that stral_to_surface_converter.py is also omitted
Copy link

github-actions bot commented Nov 20, 2024

Name Stmts Miss Cover Missing
artist\__init__.py 5 0 100%
artist\field\__init__.py 13 0 100%
artist\field\actuator.py 16 2 88% 101, 121
artist\field\actuator_array.py 26 2 92% 91-92
artist\field\actuator_ideal.py 8 0 100%
artist\field\actuator_linear.py 38 0 100%
artist\field\facets_nurbs.py 26 0 100%
artist\field\heliostat.py 156 3 98% 117-118, 277
artist\field\heliostat_field.py 20 0 100%
artist\field\kinematic.py 10 2 80% 68, 79
artist\field\kinematic_rigid_body.py 74 0 100%
artist\field\receiver.py 41 2 95% 142, 146
artist\field\receiver_field.py 19 0 100%
artist\field\surface.py 19 0 100%
artist\raytracing\__init__.py 3 0 100%
artist\raytracing\heliostat_tracing.py 107 1 99% 4
artist\raytracing\rays.py 6 0 100%
artist\raytracing\raytracing_utils.py 9 0 100%
artist\scenario.py 118 2 98% 214, 679
artist\scene\__init__.py 4 0 100%
artist\scene\light_source.py 13 2 85% 63, 94
artist\scene\light_source_array.py 29 2 93% 88-89
artist\scene\sun.py 39 1 97% 242
artist\util\__init__.py 24 8 67% 56-57, 62-67
artist\util\alignment_optimizer.py 93 0 100%
artist\util\config_dictionary.py 167 0 100%
artist\util\nurbs.py 136 10 93% 166-167, 279, 283, 285-286, 360-361, 364-365
artist\util\utils.py 91 0 100%
TOTAL 1310 37 97%

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.

Alignment Optimization
1 participant