Notebook#

General#

pyxel.display_detector(detector, *, new_display=False, custom_histogram=True)[source]#

Display detector interactively.

Parameters:
  • detector (Detector)

  • new_display (bool, default: False) – Enable new display.

    Note

    This parameter is provisional and can be changed or removed.

  • custom_histogram (bool, default: True) – Use a custom method to display the histogram. This parameter can only be used when new_display is enabled.

    Note

    This parameter is provisional and can be changed or removed.

Notes

When using new_display parameter is enabled and trying to display the detector with the y-log scale, the histogram will not be displayed (see issue [#2591](holoviz/holoviews#2591) in [Bokeh](https://docs.bokeh.org/).

To resolve this issue, you need to set the custom_histogram parameter to True.

Examples

>>> import pyxel
>>> from pyxel.detectors import CCD
>>> detector = CCD(...)
>>> pyxel.display_detector(detector)
../../_images/display_detector.jpg
>>> pyxel.display_detector(detector, new_display=True)
../../_images/new_display_detector.jpg
pyxel.display_html(obj)[source]#

Display object attributes and their types in a HTML table.

Parameters:

obj (Callable) – Object to display.

Returns:

HTML – HTML object from the rendered template.

pyxel.display_scene(detector, figsize=(8, 6))[source]#

Display the scene contained in ‘detector’ and the size of the detector.

Examples

>>> import pyxel
>>> pyxel.display_scene(detector)
../../_images/display_scene.jpg

Displaying calibration inputs and outputs in notebooks#

pyxel.display_calibration_inputs(calibration, detector)[source]#

Display calibration inputs and target data based on configuration file.

Parameters:
  • calibration (Calibration) – Instance of Calibration.

  • detector (Detector) – Instance of Detector.

Returns:

plot (Layout)

pyxel.display_simulated(ds)[source]#

Display simulated and target data from the output dataset.

Parameters:

ds (Dataset) – Result dataset.

Returns:

Layout

pyxel.display_evolution(ds)[source]#

Display best champion parameter and overall fitness vs evolution.

Parameters:

ds (Dataset) – Result dataset.

Returns:

plot (Layout) – Output plot.

pyxel.optimal_parameters(ds)[source]#

Return a dataframe of best parameters.

Parameters:

ds (Dataset) – Result dataset.

Returns:

best (DataFrame) – Best champion parameters

pyxel.champion_heatmap(ds, num_bins=100, logx=False, parameter_range=None, island_range=None, ind_range=None)[source]#

Plot a heatmap of champion parameters vs fitness.

Parameters:
  • ds (Dataset) – Result dataset.

  • num_bins (int) – Number of bins, default is 100.

  • logx (bool) – Logarithmic x axis.

  • parameter_range (slice) – Parameters slice.

  • island_range (slice) – Islands slice.

  • ind_range (slice) – Individuals slice.

Returns:

plot (Points) – Champion heatmap.