Skip to content

Fix pyHalo imports, hardcoded paths, and numpy array errors#7

Open
viren-pandey wants to merge 1 commit into
mwt5345:mainfrom
viren-pandey:fix/pyhalo-imports-and-hardcoded-paths
Open

Fix pyHalo imports, hardcoded paths, and numpy array errors#7
viren-pandey wants to merge 1 commit into
mwt5345:mainfrom
viren-pandey:fix/pyhalo-imports-and-hardcoded-paths

Conversation

@viren-pandey
Copy link
Copy Markdown

Summary

  • Fix ImportError for pyHalo by updating import paths (pyHalo.preset_models -> pyHalo.PresetModels.cdm/uldm)
  • Replace hardcoded absolute paths with relative paths for cross-platform compatibility
  • Fix numpy array shape error in axion simulations by adding dtype=object
  • Applied fixes to all Models I, II, III, and IV simulation scripts

Fixes #5

- Fix ImportError: changed pyHalo.preset_models to pyHalo.PresetModels.cdm/uldm
- Replace hardcoded absolute paths with relative paths based on script location
- Fix numpy array shape error by adding dtype=object in axion simulations
- Applied fixes to all Models I, II, III, and IV
@viren-pandey
Copy link
Copy Markdown
Author

This PR fixes multiple setup issues in the simulation scripts.
While setting up DeepLenseSim I encountered three main issues:

  1. ImportError with pyHalo (outdated import paths)
  2. Hardcoded absolute paths that only work on specific systems
  3. Numpy array shape errors when saving axion simulation data
    The fix improves cross-platform compatibility, resolves import errors for the latest pyHalo version, and ensures simulations can run locally without path modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model I Setup - Broken Links, Hardcoded Paths, and Import Errors

1 participant