Comments (2)
I have since understood that perhaps the intended method of controlling this is by setting the [powder.emission] setting in the xrayutilities.conf file.
I can use it that way, but it seems like the 'en' kwarg was getting passed through and should have worked, and also having the ability to control it through kwargs permits easy comparison of patterns at different incident energies. I'm also slightly confused since now I see that manually changing the pm.pdiff[0].energy=10000
doesn't affect the pm.pdiff[0].settings
attribute, which still contains the value from the conf file. Not sure what to make of that.
from xrayutilities.
@wholden: this is indeed a bug/inconvenience in the latest release which was since then fixed. Please look at issue #42 which shows how it can be done and should also work for PowderModel when you use the newest GIT version. I will make an release in the next weeks which will contain this and lots of more improvements
Using the latest GIT code the output for your example is:
`In [13]: import numpy
...: import xrayutilities as xu
...: tt = numpy.arange(5, 120, 0.01)
...: Fe_powder = xu.simpack.Powder(xu.materials.Fe, 1,
...: crystallite_size_gauss=100e-9)
...: Co_powder = xu.simpack.Powder(xu.materials.Co, 5, # 5 times more Co
...: crystallite_size_gauss=200e-9)
...: pm = xu.simpack.PowderModel(Fe_powder, Co_powder, I0=100)
...: inte = pm.simulate(tt)
...:
In [14]: pm = xu.simpack.PowderModel(Fe_powder, Co_powder, I0=100, en=10000)
In [15]: pm.pdiff[0].energy
Out[15]: 10000.000000000002
`
from xrayutilities.
Related Issues (20)
- make it possible to show different planes in reciprocal space (xu.materials.show_reciprocal_space_plane)
- Clarification of `Experiment` parameters `ndir`, `idir` and `sampleor` HOT 1
- Implementation of the anisotropic Poisson ratio
- Implementation of multiprocessing for simpack.DynamicalModel HOT 6
- installation with pyproject.toml produce a warning about the data HOT 4
- 1.7.4 warning during the Debian build process (test) HOT 1
- C-code does not respect the xrayutilities.config.VERBOSITY
- add doctest integration in the azure pipelines
- implementation of FitModel is very weird
- _area_detector_calib_fit is an empty function? HOT 2
- Testdata for Mythen Detector HOT 3
- numpy 1.25 deprecation warnings
- Stacking orientation of non-cubic layers HOT 8
- Loading .ras Files HOT 5
- Import error with numpy.core.multiarray HOT 3
- Positional arguments in KinematicalModel.simulate() HOT 3
- multiprocessing not using multiple threads HOT 1
- how to perform reciprocal space mapping HOT 3
- Exceptions in thread during Convolve gets stuck waiting for results instead of throwing an error in the main function call HOT 5
- lmfit 1.3.0 breaks simpack.FitModel HOT 2
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 xrayutilities.