Skip to content

Commit

Permalink
oops, have to move imports etc to refactored function
Browse files Browse the repository at this point in the history
  • Loading branch information
dstndstn committed Jun 8, 2020
1 parent 8e4c196 commit 917b309
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions py/legacypipe/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,14 +378,6 @@ def get_large_galaxy_version(fn):

def read_large_galaxies(survey, targetwcs, bands):
from astrometry.libkd.spherematch import tree_open, tree_search_radec

from legacypipe.catalog import fits_reverse_typemap
from tractor import NanoMaggies, RaDecPos, PointSource
from tractor.ellipses import EllipseE, EllipseESoft
from tractor.galaxy import DevGalaxy, ExpGalaxy
from tractor.sersic import SersicGalaxy
from legacypipe.survey import LegacySersicIndex, LegacyEllipseWithPriors, LogRadius, RexGalaxy

galfn = survey.find_file('large-galaxies')
if galfn is None:
debug('No large-galaxies catalog file')
Expand Down Expand Up @@ -432,9 +424,6 @@ def read_large_galaxies(survey, targetwcs, bands):
galaxies.sources = np.empty(len(galaxies), object)
galaxies.sources[:] = None

# Factor of HyperLEDA to set the galaxy max radius
radius_max_factor = 2.

I, = np.nonzero(galaxies.preburned)
if len(I):
# Non-preburned catalogs might not even have the 'freeze' column
Expand All @@ -455,6 +444,16 @@ def read_large_galaxies(survey, targetwcs, bands):
return galaxies

def get_galaxy_sources(galaxies, bands):
from legacypipe.catalog import fits_reverse_typemap
from tractor import NanoMaggies, RaDecPos, PointSource
from tractor.ellipses import EllipseE, EllipseESoft
from tractor.galaxy import DevGalaxy, ExpGalaxy
from tractor.sersic import SersicGalaxy
from legacypipe.survey import LegacySersicIndex, LegacyEllipseWithPriors, LogRadius, RexGalaxy

# Factor of HyperLEDA to set the galaxy max radius
radius_max_factor = 2.

srcs = [None for g in galaxies]
I, = np.nonzero(galaxies.preburned)
# only fix the parameters of pre-burned galaxies
Expand Down

0 comments on commit 917b309

Please sign in to comment.