merlin.composite

merlin.composite.chips_and_specs(point, specs_fn, chips_url, chips_fn, acquired, query)[source]

Returns chips and specs for a given chip spec query

Parameters:
  • point (tuple) – (x, y) which is within the extents of a chip
  • specs_fn (function) – Function that accepts a url query and returns chip specs
  • chips_url (str) – URL to the chips host:port/context
  • chips_fn (function) – Function that accepts x, y, acquired, url, ubids and returns chips.
  • acquired (str) – ISO8601 date range
  • query (str) – URL query to retrieve chip specs
Returns:

[chips], [specs]

Return type:

tuple

merlin.composite.locate(point, spec)[source]

Returns chip_x, chip_y and all chip locations given a point and spec

Parameters:
  • point (sequence) – sequence of x,y
  • spec (dict) – chip spec
Returns:

(chip_x, chip_y, chip_locations), where chip_locations is a two dimensional chip-shaped numpy array of (x,y)

Return type:

tuple