punchbowl.data.tests.test_punch_io#

Attributes#

Functions#

sample_ndcube()

test_write_data(sample_ndcube, tmpdir)

test_write_data_jp2(sample_ndcube, tmpdir)

test_write_jpeg(sample_ndcube, tmpdir)

test_write_data_jp2_with_annotation(sample_ndcube, tmpdir)

test_write_data_jp2_wrong_filename(sample_ndcube, tmpdir)

test_write_data_jp2_wrong_dimensions(sample_ndcube, tmpdir)

test_generate_data_statistics_from_zeros()

test_generate_data_statistics(sample_ndcube)

test_filename_base_generation(sample_ndcube)

test_has_typecode()

test_load_punchdata_with_history(tmpdir)

make_empty_distortion_model(→ tuple)

Create an empty distortion table

test_write_punchdata_with_distortion(tmpdir)

Module Contents#

punchbowl.data.tests.test_punch_io.TESTDATA_DIR#
punchbowl.data.tests.test_punch_io.SAMPLE_FITS_PATH_UNCOMPRESSED#
punchbowl.data.tests.test_punch_io.SAMPLE_FITS_PATH_COMPRESSED#
punchbowl.data.tests.test_punch_io.SAMPLE_OMNIBUS_PATH#
punchbowl.data.tests.test_punch_io.SAMPLE_LEVEL_PATH#
punchbowl.data.tests.test_punch_io.SAMPLE_SPACECRAFT_DEF_PATH#
punchbowl.data.tests.test_punch_io.sample_ndcube()#
punchbowl.data.tests.test_punch_io.test_write_data(sample_ndcube, tmpdir)#
punchbowl.data.tests.test_punch_io.test_write_data_jp2(sample_ndcube, tmpdir)#
punchbowl.data.tests.test_punch_io.test_write_jpeg(sample_ndcube, tmpdir)#
punchbowl.data.tests.test_punch_io.test_write_data_jp2_with_annotation(sample_ndcube, tmpdir)#
punchbowl.data.tests.test_punch_io.test_write_data_jp2_wrong_filename(sample_ndcube, tmpdir)#
punchbowl.data.tests.test_punch_io.test_write_data_jp2_wrong_dimensions(sample_ndcube, tmpdir)#
punchbowl.data.tests.test_punch_io.test_generate_data_statistics_from_zeros()#
punchbowl.data.tests.test_punch_io.test_generate_data_statistics(sample_ndcube)#
punchbowl.data.tests.test_punch_io.test_filename_base_generation(sample_ndcube)#
punchbowl.data.tests.test_punch_io.test_has_typecode()#
punchbowl.data.tests.test_punch_io.test_load_punchdata_with_history(tmpdir)#
punchbowl.data.tests.test_punch_io.make_empty_distortion_model(num_bins: int, image: numpy.ndarray) tuple#

Create an empty distortion table

Parameters:
  • num_bins (int) – number of histogram bins in the distortion model, i.e. the size of the distortion model is (num_bins, num_bins)

  • image (np.ndarray) – image to create a distortion model for

Returns:

x and y distortion models

Return type:

(DistortionLookupTable, DistortionLookupTable)

punchbowl.data.tests.test_punch_io.test_write_punchdata_with_distortion(tmpdir)#