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

interpolate outside of 2000 and 50000 setting zeta to 1. #3

Closed
wkerzendorf opened this issue May 31, 2012 · 2 comments
Closed

interpolate outside of 2000 and 50000 setting zeta to 1. #3

wkerzendorf opened this issue May 31, 2012 · 2 comments

Comments

@wkerzendorf
Copy link
Member

No description provided.

wkerzendorf referenced this issue in wkerzendorf/tardis Apr 14, 2014
mklauser referenced this issue in mklauser/tardis May 8, 2014
mklauser added a commit that referenced this issue Aug 19, 2014
aoifeboyle pushed a commit that referenced this issue Sep 25, 2015
@unoebauer
Copy link
Contributor

@wkerzendorf, @ssim: I guess that this refers to the temperature grid for the zeta values...Not sure how the PR #395 relates to this....Is the interpolation actually an issue or kept for documentation purposes. If it's the latter, let's close this issue and put a note on the docu.

@unoebauer
Copy link
Contributor

PR #395 is completely unrelated to this. However, in the course of the plasma overhaul, zetas were automatically set to 1 whenever the temperatures outside the grids are encountered. See tardis/plasma/ion_population.py:

    @staticmethod
    def get_zeta_values(zeta_data, ion_index, t_rad):
        zeta_t_rad = zeta_data.columns.values.astype(np.float64)
        zeta_values = zeta_data.ix[ion_index].values.astype(np.float64)
        zeta = interpolate.interp1d(zeta_t_rad, zeta_values, bounds_error=False,
                                    fill_value=np.nan)(t_rad)
        zeta = zeta.astype(float)

        if np.any(np.isnan(zeta)):
            warnings.warn('t_rads outside of zeta factor interpolation'
                                 ' zeta_min={0:.2f} zeta_max={1:.2f} '
                                 '- replacing with 1s'.format(
                zeta_data.columns.values.min(), zeta_data.columns.values.max(),
                t_rad))
            zeta[np.isnan(zeta)] = 1.0

        return zeta

Thus, this issue is resolved - closing!

wkerzendorf pushed a commit that referenced this issue May 7, 2020
* Initial commit

* Use PAT to clone tardis_zenodo repo

* Automatic push zenodo.json when changes

* Automatic push zenodo.json when changes #2

* Automatic push zenodo.json when changes #3

* Deactivate PR trigger

* Change `@misc` for `@software` in citations (zenodo)
isaacgsmith referenced this issue in isaacgsmith/tardis Nov 22, 2020
isaacgsmith referenced this issue in isaacgsmith/tardis Nov 22, 2020
Merge pull request #3 from KevinCawley/master
isaacgsmith referenced this issue in isaacgsmith/tardis Nov 22, 2020
isaacgsmith referenced this issue in isaacgsmith/tardis Nov 22, 2020
Merge pull request #3 from smithis7/master
andrewfullard pushed a commit that referenced this issue Dec 8, 2020
Rodot- added a commit that referenced this issue Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants