diff --git a/cscripts/Makefile.am b/cscripts/Makefile.am
index c152ab2..7a88492 100755
--- a/cscripts/Makefile.am
+++ b/cscripts/Makefile.am
@@ -162,9 +162,8 @@ testdata = $(top_srcdir)/test/data/crab.xml \
$(top_srcdir)/test/data/obs_unbinned.xml \
$(top_srcdir)/test/data/obs_stacked.xml \
$(top_srcdir)/test/data/obs_stacked_two.xml \
- $(top_srcdir)/test/data/crab_events.fits.gz \
- $(top_srcdir)/test/data/crab_cntmap.fits.gz \
- $(top_srcdir)/test/data/crab_cntmap_small.fits.gz \
+ $(top_srcdir)/test/data/crab_events.fits \
+ $(top_srcdir)/test/data/crab_cntmap.fits \
$(top_srcdir)/test/data/crab_expcube.fits.gz \
$(top_srcdir)/test/data/crab_psfcube.fits.gz \
$(top_srcdir)/test/data/crab_edispcube.fits.gz \
diff --git a/dev/make_test_data.py b/dev/make_test_data.py
new file mode 100755
index 0000000..b8a38ea
--- /dev/null
+++ b/dev/make_test_data.py
@@ -0,0 +1,87 @@
+#! /usr/bin/env python
+# ==========================================================================
+# Generates test data
+#
+# Copyright (C) 2018 Juergen Knoedlseder
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+# ==========================================================================
+import gammalib
+import ctools
+
+
+# ================= #
+# Create event list #
+# ================= #
+def create_event_list():
+ """
+ Create event list
+ """
+ # Simulate events
+ sim = ctools.ctobssim()
+ sim['inmodel'] = 'test/data/crab.xml'
+ sim['outevents'] = 'test/data/crab_events.fits'
+ sim['caldb'] = 'prod2'
+ sim['irf'] = 'South_0.5h'
+ sim['edisp'] = False
+ sim['ra'] = 83.63
+ sim['dec'] = 22.51
+ sim['rad'] = 2.0
+ sim['tmin'] = '2020-01-01T00:00:00'
+ sim['tmax'] = '2020-01-01T00:05:00'
+ sim['emin'] = 1.0
+ sim['emax'] = 100.0
+ sim.execute()
+
+ # Return
+ return
+
+
+# ================== #
+# Create counts cube #
+# ================== #
+def create_count_cube():
+ """
+ Create counts cube
+ """
+ # Allocate ctbin application and set parameters
+ bin = ctools.ctbin()
+ bin['inobs'] = 'test/data/crab_events.fits'
+ bin['outcube'] = 'test/data/crab_cntmap.fits'
+ bin['ebinalg'] = 'LOG'
+ bin['emin'] = 1.0
+ bin['emax'] = 100.0
+ bin['enumbins'] = 5
+ bin['usepnt'] = True # Use pointing for map centre
+ bin['nxpix'] = 20
+ bin['nypix'] = 20
+ bin['binsz'] = 0.2
+ bin['coordsys'] = 'CEL'
+ bin['proj'] = 'TAN'
+ bin.execute()
+
+ # Return
+ return
+
+
+# ======================== #
+# Main routine entry point #
+# ======================== #
+if __name__ == '__main__':
+
+ # Run tests
+ create_event_list()
+ create_count_cube()
+
diff --git a/pyext/Makefile.am b/pyext/Makefile.am
index 434c721..546b175 100755
--- a/pyext/Makefile.am
+++ b/pyext/Makefile.am
@@ -64,8 +64,8 @@ testscripts = ctools/tests/__init__.py \
# Test data to be distributed in $(pyexecdir)/ctools/tests/data
testdata = $(top_srcdir)/test/data/crab.xml \
- $(top_srcdir)/test/data/crab_events.fits.gz \
- $(top_srcdir)/test/data/crab_cntmap.fits.gz \
+ $(top_srcdir)/test/data/crab_events.fits \
+ $(top_srcdir)/test/data/crab_cntmap.fits \
$(top_srcdir)/test/data/phased_events.fits.gz \
$(top_srcdir)/test/data/invalid_event_list.fits.gz \
$(top_srcdir)/test/data/model_temporal_phasecurve.xml \
diff --git a/test/data/crab_cntmap.fits b/test/data/crab_cntmap.fits
new file mode 100755
index 0000000..4433ee4
--- /dev/null
+++ b/test/data/crab_cntmap.fits
diff --git a/test/data/crab_cntmap.fits.gz b/test/data/crab_cntmap.fits.gz
deleted file mode 100755
index 7b4ac37..0000000
--- a/test/data/crab_cntmap.fits.gz
+++ /dev/null
diff --git a/test/data/crab_cntmap_small.fits.gz b/test/data/crab_cntmap_small.fits.gz
deleted file mode 100755
index 231accf..0000000
--- a/test/data/crab_cntmap_small.fits.gz
+++ /dev/null
diff --git a/test/data/crab_events.fits b/test/data/crab_events.fits
new file mode 100644
index 0000000..123f676
--- /dev/null
+++ b/test/data/crab_events.fits
@@ -0,0 +1,28 @@
+SIMPLE = T / file does conform to FITS standard BITPIX = 8 / number of bits per data pixel NAXIS = 0 / number of data axes EXTEND = T / FITS dataset may contain extensions COMMENT FITS (Flexible Image Transport System) format is defined in 'AstronomyCOMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H COMMENT FITS (Flexible Image Transport System) format is defined in 'AstronomyCOMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H COMMENT FITS (Flexible Image Transport System) format is defined in 'AstronomyCOMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H END XTENSION= 'BINTABLE' / binary table extension BITPIX = 8 / 8-bit bytes NAXIS = 2 / 2-dimensional binary table NAXIS1 = 36 / width of table in bytes NAXIS2 = 253 / number of rows in table PCOUNT = 0 / size of special data area GCOUNT = 1 / one data group (required keyword) TFIELDS = 8 / number of fields in each row TTYPE1 = 'EVENT_ID' / label for field 1 TFORM1 = '1J ' / data format of field: 4-byte INTEGER TZERO1 = 2147483648 / offset for unsigned integers TSCAL1 = 1 / data are not scaled TTYPE2 = 'TIME ' / label for field 2 TFORM2 = '1D ' / data format of field: 8-byte DOUBLE TUNIT2 = 's ' / physical unit of field TTYPE3 = 'RA ' / label for field 3 TFORM3 = '1E ' / data format of field: 4-byte REAL TUNIT3 = 'deg ' / physical unit of field TTYPE4 = 'DEC ' / label for field 4 TFORM4 = '1E ' / data format of field: 4-byte REAL TUNIT4 = 'deg ' / physical unit of field TTYPE5 = 'ENERGY ' / label for field 5 TFORM5 = '1E ' / data format of field: 4-byte REAL TUNIT5 = 'TeV ' / physical unit of field TTYPE6 = 'DETX ' / label for field 6 TFORM6 = '1E ' / data format of field: 4-byte REAL TUNIT6 = 'deg ' / physical unit of field TTYPE7 = 'DETY ' / label for field 7 TFORM7 = '1E ' / data format of field: 4-byte REAL TUNIT7 = 'deg ' / physical unit of field TTYPE8 = 'MC_ID ' / label for field 8 TFORM8 = '1J ' / data format of field: 4-byte INTEGER EXTNAME = 'EVENTS ' / name of this extension DSTYP1 = 'TIME ' / Data sub-space type DSUNI1 = 's ' / Data sub-space unit DSVAL1 = 'TABLE ' / Data sub-space value DSREF1 = ':GTI ' / Data sub-space reference DSTYP2 = 'ENERGY ' / Data sub-space type DSUNI2 = 'TeV ' / Data sub-space unit DSVAL2 = '1:100 ' / Data sub-space value DSTYP3 = 'POS(RA,DEC)' / Data sub-space type DSUNI3 = 'deg ' / Data sub-space unit DSVAL3 = 'CIRCLE(83.63,22.51,2)' / Data sub-space value NDSKEYS = 3 / Number of data sub-space keys NMCIDS = 2 / Number of Monte Carlo identifiers MID00001= 1 / Monte Carlo identifier for model 1 MMN00001= 'Crab ' / Name of model 1 MID00002= 2 / Monte Carlo identifier for model 2 MMN00002= 'Background' / Name of model 2 CREATOR = 'GammaLib' / Program which created the file TELESCOP= 'CTA ' / Telescope OBS_ID = '000001 ' / Observation identifier DATE-OBS= '2020-01-01' / Observation start date TIME-OBS= '00:00:00' / Observation start time DATE-END= '2020-01-01' / Observation end date TIME-END= '00:05:00' / Observation end time TSTART = 6.3110886918E+08 / [s] Mission time of start of observation TSTOP = 6.3110916918E+08 / [s] Mission time of end of observation MJDREFI = 51544 / [days] Integer part of time reference MJD MJDREFF = 5.0000000000E-01 / [days] Fractional part of time reference MJD TIMEUNIT= 's ' / Time unit TIMESYS = 'TT ' / Time system TIMEREF = 'LOCAL ' / Time reference TELAPSE = 2.9999999970E+02 / [s] Mission elapsed time ONTIME = 2.9999999970E+02 / [s] Total good time including deadtime LIVETIME= 2.9399999971E+02 / [s] Total livetime DEADC = 9.8000000000E-01 / Deadtime correction factor TIMEDEL = 1.0000000000E+00 / Time resolution OBJECT = ' ' / Observed object RA_OBJ = 0.0000000000E+00 / [deg] Target Right Ascension DEC_OBJ = 0.0000000000E+00 / [deg] Target Declination RA_PNT = 8.3630000000E+01 / [deg] Pointing Right Ascension DEC_PNT = 2.2510000000E+01 / [deg] Pointing Declination ALT_PNT = 9.0000000000E+01 / [deg] Average altitude of pointing AZ_PNT = 0.0000000000E+00 / [deg] Average azimuth of pointing RADECSYS= 'FK5 ' / Coordinate system EQUINOX = 2.0000000000E+03 / Epoch CONV_DEP= 0.0000000000E+00 / Convergence depth of telescopes CONV_RA = 0.0000000000E+00 / [deg] Convergence Right Ascension CONV_DEC= 0.0000000000E+00 / [deg] Convergence Declination OBSERVER= 'string ' / Observer N_TELS = 0 / Number of telescopes in event list TELLIST = 'string ' / Telescope IDs GEOLAT = 0.0000000000E+00 / [deg] Geographic latitude of array centre GEOLON = 0.0000000000E+00 / [deg] Geographic longitude of array centre ALTITUDE= 0.0000000000E+00 / [km] Altitude of array centre EUNIT = 'TeV ' / Energy unit EVTVER = 'draft1 ' / Event list version number END € AÂÎúˆvä|B§4¦A°=?½>‡¾õÛ±¼ÎTÛ € AÂÎú™¥þB§R%A¯ã·?¢z € AÂÎú <°B§Q‘A°?ÂÊ(¾ÿ]<ÞŸL € AÂÎú¡7ªšB§eˆA°0^?·o¾ùP=�®â € AÂÎú¡ä½B§S=A°6�?–
,¾÷w<÷e| € AÂÎú«_eóB§ 4A°%V?ƒá¾ûÇN½~Ð € AÂÎú¸¸B§Q…A¯ï®?ÂRÜ¿™f<ÝóE € AÂÎú¶ÊB§/ÉA°_?©øb¿ã0½E„ € AÂÎú¸"þ´B§:}A¯ë°?‚¿[¼oŽ €
+AÂÎú¾ÞÁNB§èA°W�?¢Hm¾ï9†½€| € AÂÎúÆÿ£€B§E~A°(€?”©î¾úþ�;ùŽ € AÂÎú̸�$B§VpA°XÀ?œ¦¾îî#=b' €
AÂÎúÎZÚB§"ñA¯Ø¹?�Ϻ¿wy½j�' € AÂÎúÎÜü9B§¡A°?�¥Ù¾ÿ›¯½Œ©ë € AÂÎúÏø™DB¦üA°3Œ?ŽO¾ø4¾½Þ € AÂÎúæì‚`B§O8A¯ì:?”
Ë¿õ<»Ç§ € AÂÎúëWÐB§O¹A°E.?£þn¾óÒÿ<Ã93 € AÂÎúìYƒB§5¥A°Vq?©rR¾ï‚@¼¿� € AÂÎúì@t6B§:ËA°?½à¥¿.¸¼fk8 € AÂÎúî^GÌB§0(A¯Íy?…¿ßü½‹Ì € AÂÎúóc¤lB§'ÅA°�?ºæf¾ý}g½F³à € AÂÎúõ_|TB§KCA°1‘?¢®Ì¾øºU<�
[ € AÂÎúõ˜SòB§?�A°Š?‰ñ‡¿Þ»²sÄ € AÂÎúÿä!B§=1A¯ß ?�=¿®2¼@S € AÂÎûîÓšB§I$A°|4?Äm¾æÃ