Giter Club home page Giter Club logo

exosimpublic's People

Contributors

andreaspapageorgiou avatar rychallener avatar subisarkar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

exosimpublic's Issues

Several Python3 (and other) issues

I had several minor issues when trying to run the code, which I solved as follows (seems as if they are partly linked to me running the code on Windows):

In the ExoData package:

  • Specifyied the encoding when opening the xml database file before initiating the parser, i.e. I replaced "open(filename, 'r')" in line 126 of database.py with "open(filename, 'r', encoding="utf8") (this was in reaction to a UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 215: character maps to )
  • There seems to be a python3 incompatibility in database.py (line 54), as dict.iteritems() was removed in Python3. I replaced it with dict.items() (this was in reaction to an AttributeError: 'dict' object has no attribute 'iteritems')
  • Another seemingly Python3 incompatibility (line 60 of database.py): in Python 3, dict.values() returns a view, not a list. Got rid of the error by adding a wraper ("list()") around returnDict.values() in line 60. (this was in reaction to a TypeError: 'dict_values' object does not support indexing)

In the exosim package itself:

  • I stumbled over a seeming issue with the unit handling in instrument.py. Changed "x_wav_osr = ld(x_pix_osr.rescale(pq.um))*pq.um" to x_wav_osr = ld(x_pix_osr.rescale(pq.um)/pq.um)*pq.um" in line 126 to get rid of the error (this was in reaction to a ValueError: Unable to convert between units of "dimensionless" and "um**2")
  • scipy.special.j1() also did not seem to be able to cope with units. Changed scipy.special.j1(arg) to scipy.special.j1(arg.magnitude) in line 275 of exolib.py (arg is dimensionless)

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.