Highpass

class imagepypelines.builtin_blocks.Highpass(cut_off, filter_type='ideal', butterworth_order=1)[source]

Bases: imagepypelines.core.block_subclasses.SimpleBlock

Block to apply a highpass filter to a Fourier transform

Parameters:
  • cut_off (float) – cutoff frequency for this filt. units in #TODO
  • filter_type (str) – the type of filter to apply, ‘ideal’,’gaussian’, ‘butterworth’. default is ‘ideal’
  • butterworth_order (float) – butterworth order if butterworth filter is being used. default is 1
cut_off

cutoff frequency for this filt. units in #TODO

Type:float
filter_type

the type of filter to apply, ‘ideal’,’gaussian’, ‘butterworth’

Type:str
butterworth_order

butterworth order if butterworth filter is being used

Type:float
io_map

object that maps inputs to this block to outputs

Type:IoMap
name

unique name for this block

Type:str
requires_training

whether or not this block will require training

Type:bool
trained

whether or not this block has been trained, True by default if requires_training = False

Type:bool
printer

printer object for this block, registered to ‘name’

Type:ip.Printer

Attributes Summary

EXTANT

Methods Summary

after_process() (optional overload)function that runs after processing for optional functionality.
before_process(data[, labels]) (optional overload)function that runs before processing for optional functionality.
label(lbl) (optional overload)retrieves the label for this datum
label_strategy(labels) calls self.label for each datum and returns a list or Nonetype
process(datum) (required overload)processes a single datum
process_strategy(data) processes each datum using self.process and return list
rename(name) Renames this block to the given name
train(data[, labels]) (optional or required overload)trains the block.

Attributes Documentation

EXTANT = {}

Methods Documentation

after_process()

(optional overload)function that runs after processing for optional functionality. intended for optional use as a cleanup function

Parameters:None
before_process(data, labels=None)

(optional overload)function that runs before processing for optional functionality. this function takes in the full data list and label list. does nothing unless overloaded

Parameters:
  • data (list) – list of datums to process
  • labels (list,None) – corresponding label for each datum, None by default (for unsupervised systems)
label(lbl)

(optional overload)retrieves the label for this datum

label_strategy(labels)

calls self.label for each datum and returns a list or Nonetype

process(datum)[source]

(required overload)processes a single datum

Parameters:datum – datum to process
Returns:datum processed by this block
Return type:processed
process_strategy(data)

processes each datum using self.process and return list

rename(name)

Renames this block to the given name

Parameters:name (str) – the new name for your Block
Returns:object reference to this block (self)
Return type:ip.Block

Note

unlike naming your block using the name parameter in instantiation, imagepypelines will not guarantee that this name will be unique. It is considered the user’s responsibility to determine that this will not cause problems in your pipeline.

train(data, labels=None)

(optional or required overload)trains the block. overloading is required if the ‘requires_training’ parameter is set to True

users are expected to save pertinent variables as instance variables

Parameters:
  • data (list) – list of datums to train on
  • labels (list,None) – corresponding label for each datum, None by default (for unsupervised systems)
Returns:

None