Skip to content
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 check that the photosphere bounds and dimensions match the input atmosphere #171

Open
sguillot opened this issue Oct 14, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@sguillot
Copy link
Contributor

sguillot commented Oct 14, 2022

In #168, it is discussed that the the strict bounds should be relaxed.

But it is important to add a verification that the photosphere bounds defined by the user must match the values available in the input atmosphere tables. Otherwise, a clear error message should be displayed.

Similarly, there should be a check that the dimensions of the photosphere match those of the input atmosphere tables.

@sguillot sguillot added the enhancement New feature or request label Oct 14, 2022
@sguillot sguillot changed the title Add a check that the photosphere bounds match input atmosphere Add check that the photosphere bounds and dimensions match the input atmosphere Oct 14, 2022
@thjsal thjsal self-assigned this Dec 10, 2022
@thjsal
Copy link
Contributor

thjsal commented Dec 10, 2022

I have thought a bit about how to do this in practice, and I see now 3 different options:

  1. We can add this type of check in the installable part of X-PSI (but outside the atmosphere extension), but it may require abandoning some of the flexibility with different atmosphere extensions that X-PSI currently has. We would e.g. have to enforce which of the atmosphere table parameters is temperature (first one in the table?) and that it must be in the format of "logT" as currently with nsx..... However, probably this check could be such, that it can be overwritten by the user.

  2. This check could be done in the atmosphere extension itself (i.e. hot.pyx), then it would indeed be specific to the used extension. In that case, need to pass the information about the hard bounds to the functions in that file.

  3. This check could also be done in the scripts that we use to run X-PSI (easiest option).

@thjsal
Copy link
Contributor

thjsal commented Dec 10, 2022

Another question is whether this needs to be an error rather than a warning. One might also want to keep the possibility of extrapolating outside of the atmosphere table bounds, or is that always a very bad idea?

Also, the bounds of the atmosphere table bounds can be multi-dimensional in terms of X-PSI parameters, e.g. surface gravity depending both on mass and radius, or a luminosity parameter depending on temperature, mass, and radius. Then looking at the hard bounds of a single X-PSI parameter is not very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants