Code Monkey home page Code Monkey logo

starry_night's People

Contributors

jebuss avatar maxnoe avatar solarer avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

starry_night's Issues

pytables is called `tables`

when pip installing, I get this error:
last two lines are interesting only

(sn) ~/fact/starry_night:master$ pip install -e .
Obtaining file:///home/dneise/fact/starry_night
Collecting pandas (from starry-night==1.2.0)
  Using cached pandas-0.19.2-cp36-cp36m-manylinux1_x86_64.whl
Collecting scipy (from starry-night==1.2.0)
  Using cached scipy-0.18.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting pyephem (from starry-night==1.2.0)
  Using cached pyephem-3.7.6.0.tar.gz
Collecting requests (from starry-night==1.2.0)
  Using cached requests-2.13.0-py2.py3-none-any.whl
Requirement already satisfied: numpy in /home/dneise/anaconda3/envs/sn/lib/python3.6/site-packages (from starry-night==1.2.0)
Collecting matplotlib>=1.4 (from starry-night==1.2.0)
  Using cached matplotlib-2.0.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting docopt (from starry-night==1.2.0)
Requirement already satisfied: setuptools in /home/dneise/anaconda3/envs/sn/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg (from starry-night==1.2.0)
Collecting scikit-image (from starry-night==1.2.0)
  Using cached scikit-image-0.12.3.tar.gz
Collecting astropy (from starry-night==1.2.0)
  Using cached astropy-1.3-cp36-cp36m-manylinux1_x86_64.whl
Collecting pytables (from starry-night==1.2.0)
  Could not find a version that satisfies the requirement pytables (from starry-night==1.2.0) (from versions: )
No matching distribution found for pytables (from starry-night==1.2.0)

when renaming "pytables" to "tables" in the requires section in the setup.py it works ...
how can it be, this worked for you, but not for me?

MAGIC use case

In the refactoring process I would like to split the big starry_night script into as small as possible scripts.

See #17

So I would like to know the MAGIC use case for this Project, can you comment @CMartinWill ?

Use yaml config files

Much better than those ini files (regex parsing of arrays not necessary any more)

Missing square roots?

On Wikipedia and in the thesis, the gradient kernel and the sobel kernel are defined basically as

sqrt(x**2 + y**2) but in the implementation, the square roots are missing.

Is this intentional and what is the reason behind this?

--ratescan option causes weired AttributeError

starry_night -c Magic --ratescan
2017-02-07 22:14:08|INFO|starry_night|starry_night started
2017-02-07 22:14:08|INFO|starry_night|version: 1.2.0
2017-02-07 22:14:08|INFO|starry_night.skycam|Downloading image from http://www.magic.iac.es/site/weather/AllSkyCurrentImage.JPG
2017-02-07 22:14:11|INFO|starry_night.skycam|Processing image taken at: 2017-02-07 22:12:14
Traceback (most recent call last):
File "/Users/jbuss/anaconda/bin/starry_night", line 6, in
exec(compile(open(file).read(), file, 'exec'))
File "/Users/jbuss/workspace/starry_night/scripts/starry_night", line 583, in
main(args)
File "/Users/jbuss/workspace/starry_night/scripts/starry_night", line 228, in main
results.append(skycam.process_image(img, data, configList, args))
File "/Users/jbuss/workspace/starry_night/starry_night/skycam.py", line 1206, in process_image
log.debug('Calculate Filter response')
AttributeError: 'numpy.ndarray' object has no attribute 'debug'

astropy default convolution breaks code

The last update of astropy changed how the convolve and convolve_fft function work. They now try to normalize the kernel which does not work for Laplacian of Gaussian kernel because its sum is 0.

Adding normalize_kernel=False to all convolve and convolve_fft fixes this.

Also, if nan-values are in the image, convolve will again try to normalize the kernel, which leads to the same problem.

Adding nan_treatment='fill' fixes this.


I don't want to mess up your pull request by creating a code commit with this fix...

Is this working?

Hello,
Is this code working? It says its in the process of rewriting.
How can i process one image?

KISS

Keep it simple, stupid!

Use small scripts instead of one giant monster

fix parsing of dateformat for not matching locale

date = datetime.strptime( ret.headers['Last-Modified'], '%a, %d %b %Y %H:%M:%S GMT' ) in `starry_night.skycam.py' fails if the tame format of the local computer and that one where you request via http disagree

process keeps crashing every day

It seems that the starry_night process is crashing each day for some reason.

I guess there are some exceptions we have to handle

Traceback (most recent call last):
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 393, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 389, in _make_request
    httplib_response = conn.getresponse()
  File "/home/fact/anaconda3/lib/python3.5/http/client.py", line 1197, in getresponse
    response.begin()
  File "/home/fact/anaconda3/lib/python3.5/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/home/fact/anaconda3/lib/python3.5/http/client.py", line 258, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/home/fact/anaconda3/lib/python3.5/socket.py", line 575, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/adapters.py", line 423, in send
    timeout=timeout 
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 640, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/util/retry.py", line 261, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/packages/six.py", line 686, in reraise
    raise value
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 595, in urlopen
    chunked=chunked)
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 395, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 315, in _raise_timeout
    raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='www.magic.iac.es', port=80): Read timed out. (read timeout=10)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/fact/anaconda3/bin/starry_night", line 573, in <module>
    main(args)
  File "/home/fact/anaconda3/bin/starry_night", line 201, in main
    timeout=10,
  File "/home/fact/anaconda3/lib/python3.5/site-packages/starry_night/skycam.py", line 159, in downloadImg
    mod = get_last_modified(url, timeout=timeout)
  File "/home/fact/anaconda3/lib/python3.5/site-packages/starry_night/skycam.py", line 109, in get_last_modified
    ret = requests.head(url, timeout=timeout)
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/api.py", line 96, in head
    return request('head', url, **kwargs)
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "/home/fact/anaconda3/lib/python3.5/site-packages/requests/adapters.py", line 499, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='www.magic.iac.es', port=80): Read timed out. (read timeout=10)

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.