Skip to content

Commit

Permalink
Standarize import order
Browse files Browse the repository at this point in the history
  • Loading branch information
r-owen committed Jun 20, 2018
1 parent 918e4a9 commit d0d147c
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 0 additions & 2 deletions bin.src/makeSourceList.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
import warnings

import numpy as np

import astropy.table

import lsst.utils
import lsst.pipe.base as pipeBase
import lsst.pex.config as pexConfig

import lsst.synpipe.makeRaDecCat as makeRaDecCat
from lsst.synpipe.FakeSourceLib import SkyMapIdContainer

Expand Down
1 change: 0 additions & 1 deletion bin.src/makeSourceListGrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import warnings

import numpy as np

import astropy.table

import lsst.utils
Expand Down
1 change: 1 addition & 0 deletions bin.src/runMatchFakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import argparse

import lsst.synpipe.matchFakes as matchFakes

if __name__ == '__main__':
Expand Down
2 changes: 2 additions & 0 deletions bin.src/tractFindVisits.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import os
import argparse
import itertools

import numpy as np

import lsst.daf.persistence as dafPersist
from distutils.version import StrictVersion

Expand Down
1 change: 0 additions & 1 deletion python/lsst/synpipe/compareModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import argparse

import numpy as np

import astropy.table

import lsst.pipe.base
Expand Down
9 changes: 4 additions & 5 deletions python/lsst/synpipe/makeFakeGalaxy.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import warnings

import numpy as np
import astropy.fits.io

This comment has been minimized.

Copy link
@timj

timj Jul 9, 2018

Member

@r-owen this is wrong. Also, the standard way recommended by astropy is to use:

from astropy.io import fits

I'll fix this in DM-7886.


import galsim

import pyfits as fits


def makeGalaxy(flux, gal, psfImage,
galType='sersic', cosmosCat=None,
Expand Down Expand Up @@ -606,7 +605,7 @@ def testMakeFake(galList, asciiTab=False, single=True, double=True, real=True):
('b_a', 'float'),
('theta', 'float')])
else:
galData = fits.open(galList)[1].data
galData = astropy.io.fits.open(galList)[1].data

for igal, gal in enumerate(galData):

Expand All @@ -630,7 +629,7 @@ def testMakeFake(galList, asciiTab=False, single=True, double=True, real=True):
if asciiTab:
raise Exception("For now, only FITS input is allowed !!")
else:
galData = fits.open(galList)[1].data
galData = astropy.io.fits.open(galList)[1].data

for igal, gal in enumerate(galData):

Expand Down Expand Up @@ -681,7 +680,7 @@ def testMakeFake(galList, asciiTab=False, single=True, double=True, real=True):
if asciiTab:
raise Exception("For now, only FITS input is allowed !!")
else:
galData = fits.open(galList)[1].data
galData = astropy.io.fits.open(galList)[1].data

for igal, gal in enumerate(galData):

Expand Down
6 changes: 4 additions & 2 deletions python/lsst/synpipe/matchFakeStars.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
matches fakes based on position stored in the calibrated exposure image header
"""

import lsst.daf.persistence as dafPersist
import numpy as np
import argparse
import re
import collections

import numpy as np

import lsst.daf.persistence as dafPersist


def getFakeSources(rootdir, dataId, tol=0.1):
"""Get list of sources which agree in position with fake ones with tol
Expand Down
1 change: 1 addition & 0 deletions python/lsst/synpipe/matchFakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import re
import argparse
import collections

import numpy as np
import astropy.table

Expand Down
1 change: 0 additions & 1 deletion python/lsst/synpipe/mergeOnlyFakes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import lsst.pex.config as pexConfig
import lsst.afw.detection as afwDetect
import lsst.pipe.tasks.multiBand as mBand

from lsst.pipe.tasks.coaddBase import getSkyInfo

# WARNING: if you want to add configuration variables (maybe how close you are
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/synpipe/randomStarFakes.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import numpy as np

import lsst.afw.image
import lsst.afw.geom
import lsst.afw.math
import lsst.pex.config
from lsst.pipe.tasks.fakes import BaseFakeSourcesConfig, BaseFakeSourcesTask

import numpy as np


class RandomStarFakeSourcesConfig(BaseFakeSourcesConfig):
nStars = lsst.pex.config.Field(dtype=int, default=1,
Expand Down

0 comments on commit d0d147c

Please sign in to comment.