Is Tags.WAVELENGTH
still necessary?
#327
TomTomRixRix
started this conversation in
Ideas
Replies: 1 comment
-
I like the idea of removing redundancy in the code. I would just make the methods more explicit about what they do, such as |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently there are two different tags:
Tags.WAVELENGTHS
andTags.WAVELENGTH
. While the former is used to define all wavelengths used for simulation or processing, the latter is used to specify the currently processed wavelength or the wavelength to be visualized or tested.Tags.WAVELENGTH
is iteratively updated in the global settings in thesimulate
method while looping through all wavelengths.💡 Idea:
Remove the
Tags.WAVELENGTH
and:In
examples
andtests
replace theTags.WAVELENGTH
with the last entry fromTags.WAVELENGTHS
as this value will anyways be set during simulation insimulate()
.In all
simulation modules
andprocessing components
we could pass the currently used wavelength from thesimulate
method to each adapter. Currently everything happens in therun
method of the adapter, however, this should maybe be independent of wavelengths. The wavelength is currently only used for reading and writing the required data for each adapter. Therefore, two new abstract methods could be introduced:load_data
andsave_data
. We could eithera) write something like this
where we return the loaded and processed data and give it to the next function via arguments, or
b) use such a solution
where the data is stored in attributes of the adapter.
Pros and Cons
load_data
method of the adapter but providing your own data to the adapter, e.g.Things to consider
Beta Was this translation helpful? Give feedback.
All reactions