Project

General

Profile

Bug #4768

empty array in FA

Added by Ben Hambrecht almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Start date:
10/07/2013
Due date:
% Done:

0%

Estimated time:
Duration:

Description

************************** starting AllocateFibers **************************

Started fiber allocation. Importing from data bank...
...done. []
There are 0 galaxies in tiles
Min-Max RA Tiles: 337.074767 353.993273
Min-Max DEC Tiles: -25.722088 -10.872088
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
    202             else:
    203                 filename = fname
--> 204             __builtin__.execfile(filename, *where)

/Users/ben/Documents/DESpec/repo/despec/03-AllocateFibers/AllocateFibers_Forero-Romero/AllocateFibers.py in <module>()
    520 # =====================================================
    521 if __name__ == '__main__':
--> 522         main()
    523 

/Users/ben/Documents/DESpec/repo/despec/03-AllocateFibers/AllocateFibers_Forero-Romero/AllocateFibers.py in main()
     75         print 'Min-Max RA Tiles: %f %f'%(np.amin(tiles_centers_ra), np.amax(tiles_centers_ra))
     76         print 'Min-Max DEC Tiles: %f %f'%(np.amin(tiles_centers_dec), np.amax(tiles_centers_dec))
---> 77         print 'Min-Max RA Galaxies: %f %f'%(np.amin(gals_x_in), np.amax(gals_x_in))
     78         print 'Min-Max DEC Galaxies: %f %f'%(np.amin(gals_y_in), np.amax(gals_y_in))
     79 

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/fromnumeric.pyc in amin(a, axis, out, keepdims)
   1985     else:
   1986         return _methods._amin(a, axis=axis,
-> 1987                             out=out, keepdims=keepdims)
   1988 
   1989 def alen(a):

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/_methods.pyc in _amin(a, axis, out, keepdims)
     12 def _amin(a, axis=None, out=None, keepdims=False):
     13     return um.minimum.reduce(a, axis=axis,
---> 14                             out=out, keepdims=keepdims)
     15 
     16 def _sum(a, axis=None, dtype=None, out=None, keepdims=False):

ValueError: zero-size array to reduction operation minimum which has no identity

History

#1 Updated by Ben Hambrecht almost 6 years ago

This is the output from the preceding modules:

************************** starting SelectTargets **************************

=============================
entered Target Selection
=============================
... performed dummy cuts
ELG: 9
... performed ELG cuts
LRG: 29
... performed LRG cuts
... computed target selection flag
... wrote target selection flag to disk
ELG selected:    9

ELG discarded:   997

LRG selected:    29

LRG discarded:   977

total selected:  38

total discarded: 968

undefined:       0

====================

total:           1006

*** checksum passed ***

***********************
... plot saved to  ./Figures/redshiftDistributionBeforeTargetSelection.pdf
... plot saved to  ./Figures/redshiftDistributionWithTargetSelection.pdf

************************** finished SelectTargets **************************
SelectTargets runtime: 3.56 seconds

[1] SelectTargets                               3.56s    100.0%    0MB
[2] SelectTargets                           
[3] TileSurvey                              
[4] AllocateFibers                          
[5] CalculateThroughput                     
[6] SimulateNoiseFreeGalaxySpectra          
[7] SimulateObservedGalaxySpectra           
[8] MeasureSpectroscopicRedshift            
Total                        3.56s    100.0%
/Users/ben/Documents/DESpec/repo/despec/Wrapper

************************** starting SelectTargets **************************

=============================
entered Target Selection
=============================
[9000000000000.0, 20000000000000.0]
[0.89, 0.9]

counts found
...targ, mass, type, zred 38 49 29 9
total counts found
...targ 0
 output values
... masses []
... z_true []
... central []
... ids []
... correction factors [ 0.0333665   0.0215479   0.0149926   0.0377983   0.0487041   0.0385022
  0.0216009   0.0258773   0.0309001   0.0211504   0.00057335  0.00119064
  0.0590119   0.00898722  0.0706296   0.0156191   0.0295006   0.00916958
  0.021927    0.0300279   0.040024    0.0369352 ]
len coeffs (old) 1006
len coeffs (new) 1006

************************** finished SelectTargets **************************
SelectTargets runtime: 1.2 seconds

[1] SelectTargets                               3.56s    74.7%    0MB
[2] SelectTargets                               1.20s    25.3%    0MB
[3] TileSurvey                              
[4] AllocateFibers                          
[5] CalculateThroughput                     
[6] SimulateNoiseFreeGalaxySpectra          
[7] SimulateObservedGalaxySpectra           
[8] MeasureSpectroscopicRedshift            
Total                        4.76s    100.0%
/Users/ben/Documents/DESpec/repo/despec/Wrapper

************************** starting TileSurvey **************************

Loading common configuration...
Loading command line configuration...
Setting file mode creation mask to 0002...
Parallelization mode:  []
Setting up logging system...
07-10-2013 11:46  INFO     PAUdm_init      Log file in ./Figures/DESpec.log
07-10-2013 11:46  INFO     PAUdm_init      Setting up local despecdb SQLite database...
07-10-2013 11:46  INFO     PAUdm_init      Creating a local sqlte DB...
07-10-2013 11:46  INFO     PAUdm_init      ...DB successfully created.
07-10-2013 11:46  INFO     PAUdm_init      PAUdm initialization complete.
Planning survey...
... plan mode in config! SELF
...done.
Scheduling survey...
...done.
Setting Tile ID to each galaxy
... Galaxy Field edges ...
... ... ra : 340.767669678 350.931945801
... ... dec: -21.9660930634 -14.133433342
... Tile ranges ...
... ... ra : 337.074767149 353.993272801
... ... dec: -25.7220881317 -10.8720881317

 == Allocating galaxies to tiles == 
 ... Tile Number and Position 0 303.673952355 -25.7220881317
 ... Tile Number and Position 0 307.965488748 -24.0720881317
 ... Tile Number and Position 0 315.549232965 -20.7720881317
 ... Tile Number and Position 0 322.061680181 -17.4720881317
 ... Tile Number and Position 0 327.48114518 -14.1720881317
 ... Tile Number and Position 0 331.789576046 -10.8720881317
 ... Tile Number and Position 0 305.579208244 -25.7220881317
 ... Tile Number and Position 0 313.70451318 -22.4220881317
 ... Tile Number and Position 0 309.870744636 -24.0720881317
 ... Tile Number and Position 0 320.770001391 -19.1220881317
 ... Tile Number and Position 0 317.454488853 -20.7720881317
 ... Tile Number and Position 0 326.75233395 -15.8220881317
 ... Tile Number and Position 0 323.966936069 -17.4720881317
 ... Tile Number and Position 0 331.631754211 -12.5220881317
 ... Tile Number and Position 0 329.386401068 -14.1720881317
 ... Tile Number and Position 0 333.694831935 -10.8720881317
 ... Tile Number and Position 0 307.484464132 -25.7220881317
 ... Tile Number and Position 0 315.609769068 -22.4220881317
 ... Tile Number and Position 0 311.776000525 -24.0720881317
 ... Tile Number and Position 0 322.675257279 -19.1220881317
 ... Tile Number and Position 0 319.359744742 -20.7720881317
 ... Tile Number and Position 0 328.657589838 -15.8220881317
 ... Tile Number and Position 0 325.872191957 -17.4720881317
 ... Tile Number and Position 0 333.537010099 -12.5220881317
 ... Tile Number and Position 0 331.291656957 -14.1720881317
 ... Tile Number and Position 0 335.600087823 -10.8720881317
 ... Tile Number and Position 0 309.38972002 -25.7220881317
 ... Tile Number and Position 0 317.515024957 -22.4220881317
 ... Tile Number and Position 0 324.580513168 -19.1220881317
 ... Tile Number and Position 0 313.681256413 -24.0720881317
 ... Tile Number and Position 0 330.562845727 -15.8220881317
 ... Tile Number and Position 0 321.26500063 -20.7720881317
 ... Tile Number and Position 0 335.442265988 -12.5220881317
 ... Tile Number and Position 0 327.777447846 -17.4720881317
 ... Tile Number and Position 0 333.196912845 -14.1720881317
 ... Tile Number and Position 0 337.505343711 -10.8720881317
 ... Tile Number and Position 0 311.294975909 -25.7220881317
 ... Tile Number and Position 0 319.420280845 -22.4220881317
 ... Tile Number and Position 0 326.485769056 -19.1220881317
 ... Tile Number and Position 0 332.468101615 -15.8220881317
 ... Tile Number and Position 0 337.347521876 -12.5220881317
 ... Tile Number and Position 0 339.4105996 -10.8720881317
 ... Tile Number and Position 0 335.102168733 -14.1720881317
 ... Tile Number and Position 0 329.682703734 -17.4720881317
 ... Tile Number and Position 0 323.170256518 -20.7720881317
 ... Tile Number and Position 0 315.586512301 -24.0720881317
 ... Tile Number and Position 0 339.252777764 -12.5220881317
 ... Tile Number and Position 0 334.373357503 -15.8220881317
 ... Tile Number and Position 0 341.315855488 -10.8720881317
 ... Tile Number and Position 0 328.391024944 -19.1220881317
 ... Tile Number and Position 0 337.007424622 -14.1720881317
 ... Tile Number and Position 0 321.325536733 -22.4220881317
 ... Tile Number and Position 0 331.587959622 -17.4720881317
 ... Tile Number and Position 0 313.200231797 -25.7220881317
 ... Tile Number and Position 0 325.075512407 -20.7720881317
 ... Tile Number and Position 0 317.49176819 -24.0720881317
 ... Tile Number and Position 0 341.158033653 -12.5220881317
 ... Tile Number and Position 0 343.221111376 -10.8720881317
 ... Tile Number and Position 0 336.278613392 -15.8220881317
 ... Tile Number and Position 0 338.91268051 -14.1720881317
 ... Tile Number and Position 0 330.296280833 -19.1220881317
 ... Tile Number and Position 0 333.493215511 -17.4720881317
 ... Tile Number and Position 0 323.230792622 -22.4220881317
 ... Tile Number and Position 0 326.980768295 -20.7720881317
 ... Tile Number and Position 0 315.105487685 -25.7220881317
 ... Tile Number and Position 0 319.397024078 -24.0720881317
 ... Tile Number and Position 0 343.063289541 -12.5220881317
 ... Tile Number and Position 0 345.126367265 -10.8720881317
 ... Tile Number and Position 0 338.18386928 -15.8220881317
 ... Tile Number and Position 0 340.817936398 -14.1720881317
 ... Tile Number and Position 0 332.201536721 -19.1220881317
 ... Tile Number and Position 0 335.398471399 -17.4720881317
 ... Tile Number and Position 0 325.13604851 -22.4220881317
 ... Tile Number and Position 0 328.886024183 -20.7720881317
 ... Tile Number and Position 0 317.010743573 -25.7220881317
 ... Tile Number and Position 0 321.302279966 -24.0720881317
 ... Tile Number and Position 0 344.968545429 -12.5220881317
 ... Tile Number and Position 0 340.089125168 -15.8220881317
 ... Tile Number and Position 0 334.106792609 -19.1220881317
 ... Tile Number and Position 0 327.041304398 -22.4220881317
 ... Tile Number and Position 0 318.915999462 -25.7220881317
 == Diagnostics ==
 ... Galaxies survey selected:  0
 ... Galaxies survey and target selected:  0
 == Plots == 
 ... plotting suvery + targ
 == Compute survey areas == 
 ... Mean spatial density (via union of tiles): 
 ... ... ELG: survey and target selected; only observed tiles: -0.0 galaxies/deg2
... ...  ... ... LRG: survey and target selected; only observed tiles: -0.0 galaxies/deg2

... ...  ... ... ELG: target only; all tiles; 2.86289389681 galaxies/deg^2
... ...  ... ... LRG: target only: all tiles; 9.22488033416 galaxies/deg^2

... ...  ... ... ELG: survey+targ; all tiles; 0.0 galaxies/deg^2
... ...  ... ... LRG: survey+targ; all tiles; 0.0 galaxies/deg^2

************************** finished TileSurvey **************************
TileSurvey runtime: 105.9 seconds

[1] SelectTargets                               3.56s    3.2%    0MB
[2] SelectTargets                               1.20s    1.1%    0MB
[3] TileSurvey                                  105.90s    95.7%    0MB
[4] AllocateFibers                          
[5] CalculateThroughput                     
[6] SimulateNoiseFreeGalaxySpectra          
[7] SimulateObservedGalaxySpectra           
[8] MeasureSpectroscopicRedshift            
Total                        110.67s    100.0%
/Users/ben/Documents/DESpec/repo/despec/Wrapper

#2 Updated by Ben Hambrecht almost 6 years ago

The problem is here:

counts found
...targ, mass, type, zred 38 49 29 9
total counts found
...targ 0

Apparently all these flags don't overlap. I try again with more galaxies (this was just 1000).

#3 Updated by Ben Hambrecht almost 6 years ago

now it works.

#4 Updated by Ben Hambrecht almost 6 years ago

  • Status changed from New to Resolved


Also available in: Atom PDF