Is Tags.WAVELENGTH still necessary?
#327
TomTomRixRix
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
|
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
-
|
Yes, sounds logical. Have you already looked into this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently there are two different tags:
Tags.WAVELENGTHSandTags.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.WAVELENGTHis iteratively updated in the global settings in thesimulatemethod while looping through all wavelengths.💡 Idea:
Remove the
Tags.WAVELENGTHand:In
examplesandtestsreplace theTags.WAVELENGTHwith the last entry fromTags.WAVELENGTHSas this value will anyways be set during simulation insimulate().In all
simulation modulesandprocessing componentswe could pass the currently used wavelength from thesimulatemethod to each adapter. Currently everything happens in therunmethod 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_dataandsave_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_datamethod 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