New test problem LSS_SHR#392
Open
vivi235711 wants to merge 12 commits intogamer-project:mainfrom
Open
Conversation
hyschive
requested changes
Apr 15, 2026
Contributor
hyschive
left a comment
There was a problem hiding this comment.
@vivi235711 Thanks for the contribution! Please check my comment regarding a potential incompatibility issue with the latest SHR module.
| ms_ws = df_vel['core_QP']/kpc2km*soliton_m_div_v | ||
| plt.plot(time_a, (core_mass/ms_ws),':', color = 'gray', label = 'fidelity') | ||
|
|
||
| plt.plot(time_a,(core_mass/shr_calculator.revised_theo_c_FDM_Ms(0,halo_mass,m22)),'-.', color = 'black', label = 'ms sim/theo') |
Contributor
There was a problem hiding this comment.
- Why is redshift fixed to 0?
- This line seems incompatible with the latest
SHRmodul. Note thatrevised_theo_c_FDM_Msreturns 8 quantities (ms, rs, peak_dens, Rh, NFW_Rs, c_theo, c_CDM, beta), whereas here we only need the core mass.- I think this issue is caused by the fact that
git submodule update --initpoints to the commit hash57832b41de1f4c0284ca929b52ee1712d7af68f3rather than the latest commitd6de09ca7ca2449c3614d135fb8adb96ec0bbb46. Please update this PR to use the latest commit. - If this is indeed an incompatibility issue, please update all scripts in
script_for_paper_fig/as well.
- I think this issue is caused by the fact that
Note that the second point above leads to the following error:
Command-line arguments:
-------------------------------------------------------------------
plot__all.py -s 30 -e 37 -halo 1
-------------------------------------------------------------------
Traceback (most recent call last):
File "/projectV/fish/gamer_test/t21-pr-lss-shr/gamer.new/bin/run/plot_script/plot__all.py", line 92, in <module>
plt.plot(time_a,(core_mass/shr_calculator.revised_theo_c_FDM_Ms(0,halo_mass,m22)),'-.', color = 'black', label = 'ms sim/theo')
File "/usr/local/lib/python3.10/dist-packages/pandas/core/ops/common.py", line 81, in new_method
return method(self, other)
File "/usr/local/lib/python3.10/dist-packages/pandas/core/arraylike.py", line 210, in __truediv__
return self._arith_method(other, operator.truediv)
File "/usr/local/lib/python3.10/dist-packages/pandas/core/series.py", line 6113, in _arith_method
return base.IndexOpsMixin._arith_method(self, other, op)
File "/usr/local/lib/python3.10/dist-packages/pandas/core/base.py", line 1350, in _arith_method
return self._construct_result(result, name=res_name)
File "/usr/local/lib/python3.10/dist-packages/pandas/core/series.py", line 3106, in _construct_result
out = self._constructor(result, index=self.index, dtype=dtype)
File "/usr/local/lib/python3.10/dist-packages/pandas/core/series.py", line 509, in __init__
data = sanitize_array(data, index, dtype, copy)
File "/usr/local/lib/python3.10/dist-packages/pandas/core/construction.py", line 607, in sanitize_array
subarr = _sanitize_ndim(subarr, data, dtype, index, allow_2d=allow_2d)
File "/usr/local/lib/python3.10/dist-packages/pandas/core/construction.py", line 666, in _sanitize_ndim
raise ValueError(
ValueError: Data must be 1-dimensional, got ndarray of shape (8, 8) instead
Contributor
There was a problem hiding this comment.
- Add a note in
README.mddescribing how to set-up theSHRmodule. - Also check my comment in
plot__all.pyabout an incompatibility issue.
| combined_df['ratio_revised'] = combined_df['core_mass']*0 | ||
| combined_df['ratio_schive'] = combined_df['core_mass']*0 | ||
| ratio_revised = [] | ||
| ratio_shcive = [] |
Contributor
There was a problem hiding this comment.
Suggested change
| ratio_shcive = [] | |
| ratio_schive = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds a new test problem named LSS_SHR. It builds upon the existing
LSS_Hybridproblem and provides Python scripts for analyzing the soliton-halo relationship.README.md.