farr / skyarea Goto Github PK
View Code? Open in Web Editor NEWSky Areas
License: MIT License
Sky Areas
License: MIT License
Hey Will. Would you please tag a release for ER9? I'm thinking of packaging this up as a deb and an rpm so that it gets installed cluster-wide. I see that you have set the version of the package to 1.0, but I suggest being much more conservative and starting with 0.1. So I'd suggest setting version='0.1'
in setup.py
and then creating a v0.1
release tag on GitHub. I can take care of the rest.
It slipped my mind, but we need a release for ER10 in order to pick up the HDF5 support. Would you please generate v0.2?
The plotutils module that is imported in process_areas is missing. What package does it come from?
Through the lalinference
import, this code seems to require LALSuite. This is neither mentioned in the README
nor docs/index.rst
.
Additionally, setup.py
specifies glue
in install_requires
. When installing with pip
, it installs this glue. Based on their descriptions, I'm pretty sure the intent is to use this LIGO glue instead, but I also don't see any references to it, so I'm not sure that dep is even required.
When we search over the number of clusters k over n points with dimensionality d, it often occurs that there are degenerate clusters that contain fewer than d distinct points. When this happens, we have to discard the degenerate clusters. What is the correct way to count degenerate clusters in the BIC? Should the discarded points be counted in the numerator? Should the discarded degrees of freedom be counted in the denominator? Right now, we are counting both.
I occasionally get this traceback:
/home/user/local/lib/python2.7/site-packages/sky_area/sky_area_clustering.py:632: RuntimeWarning: divide by zero encountered in log
return np.sum(np.log(self.posterior(pts))) - nparams/2.0*np.log(self.kde_pts.shape[0])
Traceback (most recent call last):
File "/home/user/local/bin/run_sky_area.py", line 170, in <module>
skypost3d = sac.Clustered3DKDEPosterior(np.column_stack((data['ra'], data['dec'], data['dist'])))
File "/home/user/local/lib/python2.7/site-packages/sky_area/sky_area_clustering.py", line 581, in __init__
self._set_up_optimal_k()
File "/home/user/local/lib/python2.7/site-packages/sky_area/sky_area_clustering.py", line 295, in _set_up_optimal_k
bic = self._set_up_optimal_kmeans(k, self.ntrials)
File "/home/user/local/lib/python2.7/site-packages/sky_area/sky_area_clustering.py", line 343, in _set_up_optimal_kmeans
self._set_up_kmeans(k, means=best_means, assign=best_assign)
UnboundLocalError: local variable 'best_means' referenced before assignment
Looking at the _set_up_kmeans
function, the immediate cause is probably that bic
evaluates to np.NINF
on every loop iteration. Strictly speaking, it's also possible that the loop count ntrials
is zero and the loop body never runs, but this is unlikely because ntrials
seems to come straight from the program's command line arguments.
This is event 317140 from the 2016 scenario in the first2years paper.
I'll set the random seed to a fixed value from now on so that the results are reproducible.
Hi Will,
I'm just new of github, thus I'm not sure how everything works. In particular I'm not sure I can push myself to the repo. Thus for the moment I'm just opening a ticket.
Working with the latest version of the code I do see occasional errors like:
Traceback (most recent call last):
File "/home/salvatore.vitale/lalsuites/skyPP/bin/run_sky_area.py", line 150, in <module>
inj.simulation_id, inj.longitude, inj.latitude)
File "/home/salvatore.vitale/lalsuites/skyPP/bin/run_sky_area.py", line 58, in save_areas
areas = skypost.sky_area(levels)
File "/home/salvatore.vitale/lalsuites/skyPP/sky_area/sky_area_clustering.py", line 510, in sky_area
post_levels = [self.greedy_posteriors[int(round(cl*self.ranking_pts.shape[0]))] for cl in cls]
IndexError: index out of bounds
Something else (minor):
import sky_area.sky_area_clustering as sac
I had to change it in
import sky_area_clustering as sac
Cheers,
salvo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.