Giter Site home page Giter Site logo

spiderman's People

Contributors

eas342 avatar exowanderer avatar lkreidberg avatar sebastian-zieba avatar taylorbell57 avatar tomlouden avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

spiderman's Issues

speed improvement

Using LMFIT to fit sine waves to Spitzer data, I can usually fit the model to 60k data points in ~15 seconds with leastsq as the method, and ~200 seconds with powell as the method.

With SPIDERMAN, using leastsq, it takes 650 seconds. I am still processing it with powell, but the point is that it's not even close to done yet.

Do you have any suggestions to speed up the fitting process? Do we have to create a new Parameters every single time (I tried not doing that). Is there a 'fast' version with less options?

Thank you

Healpix Brightness Maps

Presently, Spiderman doesn't allow users to import brightness maps on a healpix grid which would be a super useful feature (likely requiring healpy as a dependency). As of right now I need to convert my healpix grids to spherical harmonics which loses a lot of information, and then spiderman converts those to the concentric-circle grid. If spiderman calculates the latitude-longitude grid somewhere, one could just do an interpolation between the nearest healpy coordinates. spiderman.format_grid() currently does not accept healpix grids as they are not rectangular in latitude-longitude

installation failure

I just tried to install SPIDERMAN from the GitHub version, but get the following error. Is this a python version issue?

sudo python setup.py install
Password:
/opt/anaconda3/lib/python3.9/site-packages/setuptools/dist.py:772: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running install
/opt/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/opt/anaconda3/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing spiderman_package.egg-info/PKG-INFO
Traceback (most recent call last):
File "/Users/jteske/Documents/GitHub/SPIDERMAN/setup.py", line 9, in
setup( name='spiderman-package',
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 177, in setup
return run_commands(dist)
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 193, in run_commands
dist.run_commands()
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
self.run_command(cmd)
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command
super().run_command(command)
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py", line 74, in run
self.do_egg_install()
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py", line 123, in do_egg_install
self.run_command('bdist_egg')
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 317, in run_command
self.distribution.run_command(command)
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command
super().run_command(command)
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/command/bdist_egg.py", line 156, in run
self.run_command("egg_info")
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 317, in run_command
self.distribution.run_command(command)
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command
super().run_command(command)
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 301, in run
writer(self, ep.name, os.path.join(self.egg_info, ep.name))
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 665, in write_pkg_info
metadata.write_pkg_info(cmd.egg_info)
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1136, in write_pkg_info
self.write_pkg_file(pkg_info)
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 198, in write_pkg_file
write_field('License', rfc822_escape(license))
File "/opt/anaconda3/lib/python3.9/site-packages/setuptools/_distutils/util.py", line 518, in rfc822_escape
lines = header.split('\n')
AttributeError: 'list' object has no attribute 'split'

AttributeError: 'ModelParams' object has no attribute 'stellar_model'

Hi there,

I ran into a problem when going through the Quickstart example in the documentation. When it came to this line,

lc = spider_params.lightcurve(t)

I receive this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "//anaconda/lib/python3.5/site-packages/spiderman_package-1.0.0-py3.5-macosx-10.6-x86_64.egg/spiderman/params.py", line 356, in lightcurve
    return sp.lightcurve(t,self,**kwargs)
  File "//anaconda/lib/python3.5/site-packages/spiderman_package-1.0.0-py3.5-macosx-10.6-x86_64.egg/spiderman/web.py", line 95, in lightcurve
    star_grid = sp.stellar_grid.gen_grid(spider_params.l1,spider_params.l2,logg=logg,response=spider_params.filter, stellar_model = spider_params.stellar_model)
AttributeError: 'ModelParams' object has no attribute 'stellar_model'

When importing spiderman I also received this note, which might be of relevence?:

looking for spidermanrc file at ~/.spidermanrc
no spidermanrc file detected

Help would be appreciated, thanks!

Retrieval tutorial?

Might it be useful to have a short tutorial on retrieving parameters from an observed phase curve using something like emcee? If so, happy to make a relevant PR.

Thanks for a great package!

no spidermanrc file detected

Hi there!

I'm experiencing a problem trying to import SPIDERMAN. After a successful installation and following the Quickstart example, I immediately run in to trouble trying to import spiderman:

Python 3.8.10 (default, Jun  2 2021, 10:49:15) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import spiderman
looking for spidermanrc file at /home/nicholas/.spidermanrc
no spidermanrc file detected
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-be33eac7d0a5> in <module>
----> 1 import spiderman

/usr/local/lib/python3.8/dist-packages/spiderman_package-1.0.3-py3.8-linux-x86_64.egg/spiderman/__init__.py in <module>
     21 rcParams = RcParams()
     22 
---> 23 from spiderman.params import *
     24 from spiderman.web import *
     25 from spiderman.plot import *

/usr/local/lib/python3.8/dist-packages/spiderman_package-1.0.3-py3.8-linux-x86_64.egg/spiderman/params.py in <module>
      2 import spiderman as sp
      3 import spiderman._web as _web
----> 4 import spiderman.plot as splt
      5 import matplotlib.pyplot as plt
      6 from scipy.optimize import minimize

/usr/local/lib/python3.8/dist-packages/spiderman_package-1.0.3-py3.8-linux-x86_64.egg/spiderman/plot.py in <module>
      4 import numpy as np
      5 import matplotlib.pyplot as plt
----> 6 from matplotlib._png import read_png
      7 from matplotlib.offsetbox import TextArea, DrawingArea, OffsetImage, \
      8     AnnotationBbox

ModuleNotFoundError: No module named 'matplotlib._png'

Hence, two problems seems so arise

  1. no spidermanrc file detected - similar to the issue #24
  2. matplotlib._png may not be satisfied for maplotlib versions > 3.2.x? Downgrading to the version 3.2.x. did the trick (i.e. python -m pip install --upgrade matplotlib==3.3.2)

Regarding the first issue, I tried to install SPIDERMAN both with pip and directly from github, but unfortunately with the same outcome. As an extra note I have functional BATMAN installation under Python 3.8.10.

Thanks for your help!
Nicholas

Negative xi in Zhang & Showman 2017 model

Hi Tom, Laura,
I noticed that the condition to calculate temperature for the Zhang & Showman model in the brigthness_maps.c file does not seem to account for negative xi values. This relates to line 224 and the condition :

if(xi < 0.01)

Their model allows for hotspot offsets eastward as well as wesward, so xi can be negative. I think that replacing the condition by

if(fabs(xi) < 0.01)

should do the trick.

Let me know what you think.

Vincent

Add reflection termm to reach albedo

I work with the Zhang model.
Can i add reflection term with
Ref = ARef*(1.0+np.cos(2.np.pi(time/p)+np.pi))
to the zhang model to reach amplitude of reflection and albedo?

Thank you

Stellar grid usage

I am fitting a Spitzer phase curve with the SPIDERMAN model, but at every iteration of the LMFIT, the routine outputs this:

no stellar models provided, using blackbody approximation

How do I supply it with a stellar model? Or, how do I suppress this warning?

Thank you

Stellar grid(?) going out of range of filter interpolation

Hi again,

I'm attempting to provide spiderman with a bandpass filter - but when I set spider_params.filter = 'filter.txt' and attempt to run, I get this traceback:

Traceback (most recent call last):
  File "spiderman_test.py", line 37, in <module>
    lc = spider_params.lightcurve(t)
  File "//anaconda/lib/python3.5/site-packages/spiderman/params.py", line 357, in lightcurve
    return sp.lightcurve(t,self,**kwargs)
  File "//anaconda/lib/python3.5/site-packages/spiderman/web.py", line 95, in lightcurve
    star_grid = sp.stellar_grid.gen_grid(spider_params.l1,spider_params.l2,logg=logg,response=spider_params.filter, stellar_model = spider_params.stellar_model)
  File "//anaconda/lib/python3.5/site-packages/spiderman/stellar_grid.py", line 56, in gen_grid
    totals += [sum_flux(b_wvl,b_flux,l1,l2,filter)]
  File "//anaconda/lib/python3.5/site-packages/spiderman/stellar_grid.py", line 94, in sum_flux
    r = f(wvl)
  File "//anaconda/lib/python3.5/site-packages/scipy/interpolate/polyint.py", line 79, in __call__
    y = self._evaluate(x)
  File "//anaconda/lib/python3.5/site-packages/scipy/interpolate/interpolate.py", line 663, in _evaluate
    below_bounds, above_bounds = self._check_bounds(x_new)
  File "//anaconda/lib/python3.5/site-packages/scipy/interpolate/interpolate.py", line 695, in _check_bounds
    raise ValueError("A value in x_new is above the interpolation "
ValueError: A value in x_new is above the interpolation range.

So the filter gets set, but it looks like the grid is trying to go over the filter interpolation range.
A fix or a suggestion would be appreciated, thanks!

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.