Open jason-neal opened 7 years ago
It looks like you're trying to fit with just two parameters-- Temperature and surface gravity, and excluding metallicity. The PHOENIXGridInterfaceNoAlpha
expects 3 parameters. In order to achieve your desired outcome you can choose to:
GridInterface
class that supports only 2 parameters-- temperature and surface gravity, which could be called, e.g. PHOENIXGridInterfaceNoAlphaNoFeH
One might object to the first solution due to a desire to fix metallicity, however fixing metallicity can be achieved through priors or other hacks (see related issues on "fixlogg"). The second solution is more satisfying, but requires some subtle spot-checking of code. I'm happy to consult on any Pull Requests though-- we welcome and encourage first time contributors! In fact I just implemented an unrelated model grid with just 2 parameters, so it is doable. Best of luck, and thank you for your contribution.
ps, if you don't object, I might rename this issue something along the lines of "Support for Phoenix Models with fixed metallicity", since that will assist others in finding this issue if they have similar problems.
Ah thank you. As I mentioned I was trying to run the tutorial, following the instructions to the letter.
The instructions are to copy the config file and only change the name and the path to the model files. The config file was updated to a 2 parameter model version, which seems to be the cause of the failure. I will add a PR to update some of the tutorial once I am finished. I found the suitable parameters from the config file for the tutorial in your starfish demos.
I was not trying to fix the logg, but I am actually more interested in the mixture model type which I see that is currently an open issue. I have high resolution NIR spectra of stars with brown dwarf companions with flux ratios estimated <1%. At the moment I am trying to see if I can detect anything of the companion when combining phoenix models, or get an upper limit on the flux ratio. I have currenty looking at using Starfish for the gridtools component at the moment as it looks alot nicer than my code to retrive all the phoenix models.
There is experimental code to do inference on binaries here, but it's basically untested, and has known bugs. I'll be revamping this code eventually, so I invite you to subscribe to the GitHub notifications for the relevant issues for the most up to date information. Good luck!
Your project to detect brown dwarf companions sounds very interesting. However, I just want to sound a note of caution about trying to detect their spectra by direct fitting with synthetic models, especially if you think their expected fluxes are less than 1%. While this should in principle be possible, I think you will be limited by the inaccuracies in the synthetic spectra. Suppose one has a single star, but tries to fit it with a binary model. I think that in many cases, one could get a better fit using a two component model, since (especially with varying v_z
) the spectrum of the second star could be used to fill in some of the inadequacies of the synthetic spectrum of the primary star. If this is the case for a single star, then in the case that you actually do have two stars I think it would be hard to conclusively demonstrate that you have correctly detected the flux of the secondary. If you had multiple epochs with known velocity changes, then you might be able to use this information as a check, but I still think this will be a difficult thing to do.
I am glad to hear that you have found the grid_tools
file to be useful, this was one of the main motivations for making Starfish a public repository of "tools for spectroscopic inference," since sometimes people just need a few routines to apply to their own work.
I am trying to do the first WASP14 tutorial but have not been able to generate the hdf5 data yet.
I setup config file like the docs as shown .
But when I try to run the HDF5Creator code from the docs I get an Assertion Error.
If I print out Starfish.grid I get
{'hdf5_path': 'libraries/PHOENIX_TRES_test.hdf5', 'buffer': 50.0, 'key_name': 't{0:.0f}g{1:.1f}', 'parrange': [[2300, 3700], [4.0, 5.5]], 'parname': ['temp', 'logg'], 'raw_path': '/home/jneal/Phd/data/fullphoenix/phoenix.astro.physik.uni-goettingen.de/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/', 'wl_range': [6300, 6360]}
I assume that these are the parameters that it is counting.
How can I resolve this issue so that I can continue on with the tutorial?