Comments (4)
Aha, good question, and something that should almost certainly be treated better in the docs.
By default, and in the way most people use it, VACUUM_TO_AIR
in keyword.dat
is set to TRUE
for RH.
Lightweaver, on the other hand, doesn't touch the output wavelength grid unless you explicitly do conversions using lw.vac_to_air
.
Thus, to get a +/- 0.2 nm grid around the Halpha core, you can get the line core as follows:
In [1]: from lightweaver.rh_atoms import H_6_atom
In [2]: h = H_6_atom()
In [3]: h.lines[4].lambda0
Out[3]: 656.4691622298104
# Thus showing why the core is where it is on your plot
and then something like
halphaCore = h.lines[4].lambda0
wave = np.linspace(halphaCore - 0.2, halphaCore + 0.2, 1000)
Then if you want to plot using air wavelengths, like Ivan does, you can just call lw.vac_to_air(wave)
to use as your abscissa.
Whilst it's nice to see that things work, with the way you're recomputing the spectrum using your own choice of wavelength grid (the wave
variable), there's no need to adjust the quadrature on the model atom.
For most things (definitely in quiet sun cases) the basic quadrature that's defined on the atom should be sufficient for the RT operator to converge, and then wave
allows you to synthesise in as little, or as much detail as you want, to get a nice smooth output. Now, for very high Doppler shifts you may need to adjust the quadrature, in the way you've done here to avoid undersampling the core if it flies off into the distance. So, it is worth being aware of.
I'd definitely like to improve the docs further, currently it's essentially API documentation, but I expect it's very dense for anyone less familiar with the core materials to get into.
Cheers!
from lightweaver.
Ahh I see. Thanks! That seems to work. And thanks for the tip regarding the quadrature changes. I was not exactly sure why those were needed and was admittedly blindly trying to reproduce the RH examples.
from lightweaver.
I'll go ahead and close this. Do you think the toy example involving the effect of velocity on the absorption profile (as shown in Ivan's notebook) would be a useful gallery example?
from lightweaver.
If you would like to write up this example into a documented gallery example, I would be more than happy to accept a PR!
from lightweaver.
Related Issues (20)
- Allow fixing collisional rates
- Calling atmos.convert_scales when associated with a context "de-links" the arrays
- Make Ng stuff available from Python
- Create list of required packages HOT 2
- Consider adding an optional damping term to nr_post_update
- Document Threads and Forking (through ProcessPool and friends)
- Improve Installation Process
- build_intersection_list for saved/loaded Contexts
- Implement threads in other formal_sol functions/allow J, rates, gamma matrices to be left fixed from python
- Use astropy units HOT 2
- Calculating Stokes parameters for 8542 example gives `ValueError` HOT 1
- Remove block on numpy build version after numbda update HOT 2
- Background Scattering Polarisation HOT 1
- Is there a possibility to obtain flux rather than specific intensity? HOT 4
- Improve `update_hprd_coeffs`
- Issue with `Atmosphere.rays` in 2D
- numba/numpy 1.24 mismatch
- RuntimeError on import with Numpy v1.22 HOT 2
- Int input to atmos.rays/compute_rays
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightweaver.