by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jul 28 03:40
    dcmvdbekerom edited #114
  • Jul 28 03:29
    dcmvdbekerom commented #114
  • Jul 28 03:28
    dcmvdbekerom synchronize #114
  • Jul 28 03:00
    dcmvdbekerom synchronize #114
  • Jul 28 00:00
    dcmvdbekerom synchronize #114
  • Jul 27 23:36
    dcmvdbekerom synchronize #114
  • Jul 27 17:36
    dcmvdbekerom synchronize #114
  • Jul 27 17:18
    dcmvdbekerom synchronize #114
  • Jul 27 16:31
    dcmvdbekerom synchronize #114
  • Jul 27 15:40
    dcmvdbekerom opened #115
  • Jul 27 14:21
    dcmvdbekerom commented #114
  • Jul 26 11:08
    erwanp review_requested #114
  • Jul 26 10:42
    erwanp edited #53
  • Jul 25 23:25
    dcmvdbekerom opened #114
  • Jul 06 17:03
    erwanp labeled #78
  • Jul 06 17:02
    erwanp commented #78
  • May 29 07:19

    minouHub on develop

    (minor) added an error to preveā€¦ (compare)

  • May 14 05:46
    jayanthchandra commented #113
  • May 13 20:15
    erwanp commented #113
  • May 13 20:14
    erwanp commented #113
Dirk van den Bekerom
@dcmvdbekerom
I get the following error:
ValueError: transmittance not defined in Spectrum spectrum2742832803272. Use one of : ['radiance']
So I guess not possible (yet)?
Erwan Pannier
@erwanp
It is
This just tells you that there is no transmittance in this Spectrum. Did you geenrate it with experimental_spectrum?
Dirk van den Bekerom
@dcmvdbekerom
yes
Erwan Pannier
@erwanp
You're paying the fact we're emission-oriented people ^^ You should use transmittance_spectrum for an experimental absorption spectrum
Dirk van den Bekerom
@dcmvdbekerom
Ahh I see
instead of experimental_spectrum?
Erwan Pannier
@erwanp
yep
Dirk van den Bekerom
@dcmvdbekerom
thanks!
Erwan Pannier
@erwanp
but yeah. It's not straightforward. We could rename experimental_spectrum to emission_spectrum, and maybe allow experimental_spectrum to be both?
Dirk van den Bekerom
@dcmvdbekerom
intuitively that would make most sense to me
where the user has to specify what he/she is loading with a keyword
or perhaps experimental_spectrum would not be needed at all (other than legacy perhaps)
Alright it seems when I do this it compares with transmittance_noslit
any way to compare it to the synthetic transmittance with slit applied
?
oops nevermind I'm having other problems
Dirk van den Bekerom
@dcmvdbekerom
ok so the problem is that the wavenumber axis does not have a constant spacing
this is technically true since it is off by a fraction of 1e-8 due to truncation errors
it seems for this reason it doesn't let me plot a spectrum with slit
by the way is this chat the right place to post this or is it better to start an issue on Github for such cases?
Erwan Pannier
@erwanp
If there's an error, you may want to start an Issue
You can resample the Spectrum, that may help fix the padding.
Erwan Pannier
@erwanp

or perhaps experimental_spectrum would not be needed at all (other than legacy perhaps)

That could be an Issue too, btw!
Did you also see this: https://radis.readthedocs.io/en/latest/spectrum/spectrum.html#initialize-from-text-file-or-arrays ?

Pankaj Mishra
@pkj-m
Hi all, I was working on implementing astropy units inplace of pint throughout RADIS and came across this particular test which calls the apply_slit(..norm_by="max") method. When it does so, the code tries to process a string "I/I0" as a unit. I have been looking all over the pint documentation but I still haven't been able to identify how this worked. Any leads on how this worked would be appreciated!
Oh wow, turns out the example Erwan shared just before my message is doing the very same thing!
Pankaj Mishra
@pkj-m
Just a guess but is that supposed to be a placeholder for representing a dimensionless quantity?
Erwan Pannier
@erwanp
yes! We could remove it. It's nice in the plots, but no need to make it appear as a unit now that Astropy is going to parse everything!
Pankaj Mishra
@pkj-m
So the BaseFactory class has a units' dictionary where this string appears as a value multiple times, for instance against keys : transmittance, transmittance_noslit and also as -ln(I/IO) for key absorbance. Can I simply replace all these by 1?
Dirk van den Bekerom
@dcmvdbekerom

or perhaps experimental_spectrum would not be needed at all (other than legacy perhaps)

That could be an Issue too, btw!
Did you also see this: https://radis.readthedocs.io/en/latest/spectrum/spectrum.html#initialize-from-text-file-or-arrays ?

Not yet, looks useful!

Erwan Pannier
@erwanp
@pkj-m yes. The only problem you'll get is when comparing against old spectra stored on disk as .spec with the unit as I/I0. There is a function in tools/database/load_spec() that can be used to check this deprecated syntax and update the unit to 1 as you load them.
Pankaj Mishra
@pkj-m
Hi @erwanp , do you think there might be any other ways of handling the issue of using strings like I/IO, -ln(I/IO) and eps in conjunction with Astropy? I have been at it for quite some time and it appears simply changing all occurrences of these strings to 1 won't resolve the issue. I have been forced to add a lot of if-else blocks in a lot of places to handle issues arising from the way astropy parses strings. For instance, while we could simply multiply two units represented as strings in pint by concatenating them with a * in between, in Astropy we need to first check whether both the strings are pure units or is one of them 1 (like in our case, following which we need to ensure that this string appears before the other string, nm in this case).
Inspite of making these changes, there are still other tests which break due to these changes, especially coming from matplotlib.
Erwan Pannier
@erwanp

simply changing all occurrences of these strings to 1 won't resolve the issue.

Can you post an example on the PR where it creates a problem? I can only think of the apply_slit() function.

Pankaj Mishra
@pkj-m
I have shared the console output on the PR ( #106 ) obtained from executing test_slit() locally on my laptop. The traceback seems to be hinting at something going wrong with matplotlib but I still not clear about it.
Erwan Pannier
@erwanp
@pkj-m I answered some of your problems: check the PR. the problem does not originate from fix_style but by how the LaTeX of the label is written.
Also, regarding the many print() comments in your code: I usually debug with the "%debug" feature of ipython, going through the different functions with "u" [up] and "d" [down], and evaluating the variables there. Of course it's up to you!
Pankaj Mishra
@pkj-m
Thanks for the help Erwan! I have implemented the changes you suggested. Right now I am trying to fix a few other errors that are coming up but hopefully this should be ready soon!
Pankaj Mishra
@pkj-m
Also, thanks for sharing the %debug feature. I was familiar with the gdb debugger for C++ but never bothered to find an equivalent for Python. I'll look into it!
Erwan Pannier
@erwanp
it's a very good one, and get all the power of having an interpreted language!
Erwan Pannier
@erwanp
Hey @pkj-m and @adityabharadwaj198 : I checked and merged your PRs, sorry for delay!!
aditya
@adityabharadwaj198
No problem! :)
Pankaj Mishra
@pkj-m
Looking good!
Dirk van den Bekerom
@dcmvdbekerom
Is there a diagram like this https://radis.readthedocs.io/en/latest/_images/RADIS_flow_chart.svg that includes the functions and modules that calculate each of the blocks
Pankaj Mishra
@pkj-m
Hey @erwanp @dcmvdbekerom and Minesi, thank you for the opportunity! I am really happy and extremely excited to be a part of RADIS! I really hope we can achieve a lot over the summer and make this project a big success!
Dirk van den Bekerom
@dcmvdbekerom
Congratulations!! I look forward to working with you on this project!
Erwan Pannier
@erwanp
Hey people! It seems that we only got one of the two project slots. It would have been even better if we got the two projects all together as they were quite synergistic. But let's see the good side of it : one is already good, and it's nice to have you onboard Pankaj!
Pankaj Mishra
@pkj-m
Thanks Erwan! Looking forward to a great summer with RADIS :)
Erwan Pannier
@erwanp
Hello @pkj-m @dcmvdbekerom : there are the Slack access : https://join.slack.com/t/radis-radiation/shared_invite/zt-ebxf872e-OQ5qGuf_HRMXTK9IXU6i3Q