Skip to content

Commit

Permalink
Cleanup high level Python blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaycedowell committed Jul 1, 2021
1 parent edb879e commit 48fa6ed
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 29 deletions.
4 changes: 1 addition & 3 deletions python/bifrost/blocks/binary_io.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2016, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -31,8 +31,6 @@
Basic file I/O blocks for reading and writing data.
"""
import numpy as np
import time
import bifrost as bf
import bifrost.pipeline as bfp
from bifrost.dtype import name_nbit2numpy

Expand Down
3 changes: 1 addition & 2 deletions python/bifrost/blocks/convert_visibilities.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (c) 2016, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -28,7 +28,6 @@
from __future__ import absolute_import

from bifrost.pipeline import TransformBlock
from bifrost.linalg import LinAlg
from bifrost.DataType import DataType
import bifrost as bf

Expand Down
3 changes: 1 addition & 2 deletions python/bifrost/blocks/fft.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (c) 2016-2020, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -33,7 +33,6 @@
from bifrost.DataType import DataType

from copy import deepcopy
import math

class FftBlock(TransformBlock):
# TODO: Add support for sizes (aka 's') parameter that defines transform
Expand Down
3 changes: 1 addition & 2 deletions python/bifrost/blocks/fftshift.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (c) 2016-2020, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -33,7 +33,6 @@

import bifrost as bf
from bifrost.pipeline import TransformBlock
from bifrost.DataType import DataType

from copy import deepcopy

Expand Down
4 changes: 1 addition & 3 deletions python/bifrost/blocks/guppi_raw.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (c) 2016, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -30,8 +30,6 @@
from bifrost.pipeline import SourceBlock
import bifrost.guppi_raw as guppi_raw

import numpy as np

def _get_with_default(obj, key, default=None):
return obj[key] if key in obj else default

Expand Down
7 changes: 2 additions & 5 deletions python/bifrost/blocks/psrdada.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (c) 2016, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -27,15 +27,12 @@

from __future__ import absolute_import

from bifrost.pipeline import SourceBlock, SinkBlock
from bifrost.pipeline import SourceBlock
from bifrost.Space import Space
from bifrost.psrdada import Hdu
from bifrost.libbifrost import _bf, _check
import bifrost.ndarray

from copy import deepcopy
import os

# TODO: Move to memory.py?
def _get_space(arr):
if isinstance(arr, bifrost.ndarray):
Expand Down
3 changes: 1 addition & 2 deletions python/bifrost/blocks/quantize.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (c) 2016, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -28,7 +28,6 @@
from __future__ import absolute_import

import bifrost as bf
import bifrost.quantize
from bifrost.pipeline import TransformBlock
from bifrost.DataType import DataType

Expand Down
3 changes: 1 addition & 2 deletions python/bifrost/blocks/reverse.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (c) 2016-2020, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -33,7 +33,6 @@

import bifrost as bf
from bifrost.pipeline import TransformBlock
from bifrost.DataType import DataType

from copy import deepcopy

Expand Down
3 changes: 1 addition & 2 deletions python/bifrost/blocks/sigproc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (c) 2016-2020, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -37,7 +37,6 @@
from bifrost.units import convert_units
from numpy import transpose

from copy import deepcopy
import os

def _get_with_default(obj, key, default=None):
Expand Down
3 changes: 1 addition & 2 deletions python/bifrost/blocks/transpose.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (c) 2016-2020, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -29,7 +29,6 @@

from bifrost.pipeline import TransformBlock
import bifrost as bf
import bifrost.transpose

from copy import deepcopy
import numpy as np
Expand Down
3 changes: 1 addition & 2 deletions python/bifrost/blocks/unpack.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (c) 2016, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -28,7 +28,6 @@
from __future__ import absolute_import

import bifrost as bf
import bifrost.unpack
from bifrost.pipeline import TransformBlock
from bifrost.DataType import DataType

Expand Down
3 changes: 1 addition & 2 deletions python/bifrost/views/basic_views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (c) 2016-2020, The Bifrost Authors. All rights reserved.
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -31,7 +31,6 @@
from bifrost.DataType import DataType
from bifrost.units import convert_units
from numpy import isclose
from copy import deepcopy


def custom(block, hdr_transform):
Expand Down

0 comments on commit 48fa6ed

Please sign in to comment.