-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add support for different modes: transmittance, radiance, and absortion coefficient #449
Conversation
Very nice ! I'd add Absorption coefficient as the default. Are the units of the plot updated too ? |
Hello, tried to run the webpage with yarn during an hour, couldn't, but I'm very motivated to succeed and try the new version. Comment from the video:
|
Just found the magic command to allow me to run it: More comments:
|
@minouHub do you think absrotpino coefficient or absorbance is more useful ? |
I typically point the API to the production backend but I have it locally set up now. I want to set it up to run the local version of the API. I'll see if I can get it working today/tomorrow. Should be able to run the Lambda locally with |
Sorry, you're right, absorbance.
I believe having the unit of absorbance "-ln(I/I0)" would be nice for the user. Just to be sure we talk about the same thing (like SpectraPlot).
Thanks. Hope it is not too much work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Units are currently harcoded here, but they are stored in the spectrum.
Could be something like (mix Python / JS sorry :p ) :
text : payload["mode"].capitalize() + s.units[payload["mode"]]
website/src/constants.ts
Outdated
@@ -13,6 +13,7 @@ export interface CalcSpectrumParams { | |||
pressure: number; | |||
path_length: number; | |||
simulate_slit: boolean; | |||
mode: "radiance_noslit" | "transmittance_noslit" | "abscoeff"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mode: "radiance_noslit" | "transmittance_noslit" | "abscoeff"; | |
mode: "radiance_noslit" | "transmittance_noslit" | "absorbance"; |
to get what @minouHub 's wanted
mode: event.target.value as | ||
| "radiance_noslit" | ||
| "transmittance_noslit" | ||
| "abscoeff", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "abscoeff", | |
| "absorbance", |
Adjusted master and rebased with this branch to invoke the local backend API and added instructions on how to do that to the README: 478a8fc |
Currently how it looks, with Absorbance now as the default. I'm using units from RADIS backend (https://github.com/suzil/radis-app/pull/449/files#diff-d45d4bd564e4f103c9d2cd4900cde1e53632e1556d0e30b4a446bac394ea02e7R81), but for some reason "absorbance" and "transmittance_noslit" are not returning any units. Any idea there? |
Simply because they have no units :) That looks very good to me! EDIT: Suggestions of Erwan have been implemented, so I think you're good to merge!!! |
Yes, they're both not dimensionned. Transmittance unit can be left as it is (nothing shown). For absorbance, you may want to display (-ln(I/I0)) just to make it very clear to the user what we're talking about ! |
Hello @suzil You merged the branch, but the page did not update on https://www.radis.app/. Also, it does not compute the spectra anymore :( |
Aha yeah sorry I just need to invalidate the CDN cache. It was updated on mine so I made the bad assumption it had updated! Will run a cache invalidation now. |
Screen.Recording.2021-10-05.at.8.39.57.PM.mov
Anything to change here? Should the default be radiance or something else? @erwanp @minouHub