Giter Club home page Giter Club logo

galstep's People

Contributors

rennehan avatar ruggiero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

galstep's Issues

Python2 -->Python3 ConfigParser and related errors

Hi Rafael,

I am trying to use galstep to generate isolated disk galaxies with a gas disk, but I am running into some trouble, which I think are stemming from me modifying the ConfigParser --> configparser in the code to be compatible with python3, I changed from ConfigParser import ConfigParser --> from configparser import ConfigParser
I ran the code using : python galstep.py -i params_galaxy.ini -o test.dat --hdf5 --force-no -cores 1 and

Here is the output :

Setting positions...
10% of halo mass cut by the truncation...
0% of disk mass cut by the truncation...
9% of bulge mass cut by the truncation...
0% of disk mass cut by the truncation...
Building gravity tree...
Filling potential grid...ous disk
Process Process-1:1
Setting temperatures...
Setting densitites...
Setting velocities...
galstep.py:232: RuntimeWarning: overflow encountered in cosh
return cte * (1/cosh(z/z0))**2 * exp(-rho/Rd)
galstep.py:400: RuntimeWarning: overflow encountered in double_scalars
sz_grid[1][i][j] = (1/disk_density(rho_axis[i], z_axis[j], M_disk, z0) *
galstep.py:401: RuntimeWarning: invalid value encountered in double_scalars
integrate.simps(ys[1][i][j:], z_axis[j:]))
galstep.py:400: RuntimeWarning: divide by zero encountered in double_scalars
sz_grid[1][i][j] = (1/disk_density(rho_axis[i], z_axis[j], M_disk, z0) *
galstep.py:418: RuntimeWarning: divide by zero encountered in double_scalars
gamma2 = 4/(kappa2rho_axis[i]) * dphi/drho
galstep.py:418: RuntimeWarning: invalid value encountered in double_scalars
gamma2 = 4/(kappa2
rho_axis[i]) * dphi/drho
Traceback (most recent call last):
File "galstep.py", line 570, in
main()
File "galstep.py", line 33, in main
write_input_file(galaxy_data)
File "galstep.py", line 550, in write_input_file
file_format=file_format)
File "/scratch/user/banik/galstep/galstep/snapwrite.py", line 85, in write_snapshot
header_data, raw_hdata = read_header(folder, n_part, input_)
File "/scratch/user/banik/galstep/galstep/snapwrite.py", line 30, in read_header
h_data.append(config.getint('header', 'flag_metals'))
File "/scratch/user/banik/.conda/envs/galpy1.7/lib/python3.7/configparser.py", line 818, in getint
fallback=fallback, **kwargs)
File "/scratch/user/banik/.conda/envs/galpy1.7/lib/python3.7/configparser.py", line 808, in _get_conv
**kwargs)
File "/scratch/user/banik/.conda/envs/galpy1.7/lib/python3.7/configparser.py", line 802, in _get
return conv(self.get(section, option, **kwargs))
ValueError: invalid literal for int() with base 10: '0 ;'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.