From 1191bb18521d52e26096eae0fbb81a24387404ab Mon Sep 17 00:00:00 2001 From: EiffL Date: Sun, 7 Nov 2021 03:01:02 +0100 Subject: [PATCH 1/2] adds prototype cfis dataset --- autometacal/python/datasets/CFIS.py | 150 +++ autometacal/python/datasets/__init__.py | 1 + notebooks/CFIS_dataset.ipynb | 1104 +++++++++++++++++++++++ 3 files changed, 1255 insertions(+) create mode 100644 autometacal/python/datasets/CFIS.py create mode 100644 notebooks/CFIS_dataset.ipynb diff --git a/autometacal/python/datasets/CFIS.py b/autometacal/python/datasets/CFIS.py new file mode 100644 index 0000000..c6a4feb --- /dev/null +++ b/autometacal/python/datasets/CFIS.py @@ -0,0 +1,150 @@ +""" TensorFlow Dataset of simulated CFIS images.""" +import tensorflow_datasets as tfds +import tensorflow as tf +import numpy as np +import galsim as gs + +_CITATION = """ +""" + +_DESCRIPTION = """ +""" + +class CFISConfig(tfds.core.BuilderConfig): + """BuilderConfig for CFIS Galaxies.""" + + def __init__(self, *, galaxy_type="parametric", + data_set_size=1000, stamp_size=51, + shear_g1=0.0, shear_g2=0.0, **kwargs): + """BuilderConfig for CFIS. + Args: + size: size of sample. + stamp_size: image stamp size in pixels. + pixel_scale: pixel scale of stamps in arcsec. + **kwargs: keyword arguments forwarded to super. + """ + v1 = tfds.core.Version("0.0.1") + super(CFISConfig, self).__init__( + description=("Galaxy stamps"), + version=v1, + **kwargs) + + # Adjustable parameters + self.galaxy_type = galaxy_type + self.data_set_size = data_set_size + self.stamp_size = stamp_size + self.kstamp_size = stamp_size + self.shear_g1 = shear_g1 + self.shear_g2 = shear_g2 + + # Fixed parameters + self.pixel_scale = 0.187 + self.psf_fwhm = 0.65 # TODO: add varying PSF + self.psf_e1 = 0.0 + self.psf_e2 = 0.025 + + +class CFIS(tfds.core.GeneratorBasedBuilder): + """DatasetBuilder for simulated CFIS dataset.""" + + VERSION = tfds.core.Version('0.0.1') + RELEASE_NOTES = { + '0.0.1': 'Initial release.', + } + + BUILDER_CONFIGS = [CFISConfig(name="parametric_1k", galaxy_type="parametric", data_set_size=1000), + CFISConfig(name="parametric_shear_1k", galaxy_type="parametric", data_set_size=1000, shear_g1=0.02)] + + def _info(self) -> tfds.core.DatasetInfo: + """Returns the dataset metadata.""" + # TODO: Specifies the tfds.core.DatasetInfo object + return tfds.core.DatasetInfo( + builder=self, + description=_DESCRIPTION, + features=tfds.features.FeaturesDict({ + 'obs': tfds.features.Tensor(shape=[self.builder_config.stamp_size, + self.builder_config.stamp_size], + dtype=tf.float32), + 'psf': tfds.features.Tensor(shape=[self.builder_config.stamp_size, + self.builder_config.stamp_size], + dtype=tf.float32), + # 'gal_kimage': tfds.features.Tensor(shape=[2, self.builder_config.kstamp_size, + # self.builder_config.kstamp_size], + # dtype=tf.float32), + # 'psf_kimage': tfds.features.Tensor(shape=[2, self.builder_config.kstamp_size, + # self.builder_config.kstamp_size], + # dtype=tf.float32), + "noise_std": tfds.features.Tensor(shape=[1], dtype=tf.float32), + "mag": tfds.features.Tensor(shape=[1], dtype=tf.float32), + }), + # If there's a common (input, target) tuple from the + # features, specify them here. They'll be used if + # `as_supervised=True` in `builder.as_dataset`. + supervised_keys=("obs", "obs"), + homepage='https://dataset-homepage/', + citation=_CITATION, + ) + + def _split_generators(self, dl_manager: tfds.download.DownloadManager): + """Returns SplitGenerators.""" + if self.builder_config.data_set_size: + size = self.builder_config.data_set_size + else: + size = 81499 + + return [ + tfds.core.SplitGenerator( + name=tfds.Split.TRAIN, + gen_kwargs={ + "size": size, + },), + ] + + def _generate_examples(self, size): + """Yields examples.""" + # Loads the galsim COSMOS catalog + cat = gs.COSMOSCatalog(sample="25.2") + mag_zp = 32 + sky_level = 400 # ADU (~variance) + psf = gs.Kolmogorov(fwhm=self.builder_config.psf_fwhm, flux=1.0) + psf = psf.shear(g1=self.builder_config.psf_e1, g2=self.builder_config.psf_e2) + + # Prepare borders for kimage + Nk = self.builder_config.kstamp_size + bounds = gs._BoundsI(-Nk//2, Nk//2-1, -Nk//2, Nk//2-1) + + for i in range(size): + # retrieving galaxy and magnitude + gal = cat.makeGalaxy(i, gal_type='parametric') + gal_mag = cat.param_cat['mag_auto'][cat.orig_index[i]] + gal_flux = 10**(-(gal_mag-mag_zp)/2.5) + + gal = gal.withFlux(gal_flux) + gal = gal.shear(g1=self.builder_config.shear_g1, g2=self.builder_config.shear_g2) + + gal_conv = gs.Convolve(gal, psf) + + gal_stamp = gal_conv.drawImage(nx=self.builder_config.stamp_size, + ny=self.builder_config.stamp_size, + scale=self.builder_config.pixel_scale + ).array.astype('float32') + + psf_stamp = psf.drawImage(nx=self.builder_config.stamp_size, + ny=self.builder_config.stamp_size, + scale=self.builder_config.pixel_scale + ).array.astype('float32') + + # gal_kimage = gal.drawKImage(bounds=bounds, + # scale=2.*np.pi/(self.builder_config.stamp_size*self.builder_config.pixel_scale), + # recenter=False).array.astype('complex64') + + # psf_kimage = psf.drawKImage(bounds=bounds, + # scale=2.*np.pi/(self.builder_config.stamp_size*self.builder_config.pixel_scale), + # recenter=False).array.astype('complex64') + + yield '%d'%i, {"obs": gal_stamp, + "psf": psf_stamp, + # "gal_kimage": np.stack([gal_kimage.real, gal_kimage.imag]), + # "psf_kimage": np.stack([psf_kimage.real, psf_kimage.imag]), + "noise_std": np.array([np.sqrt(sky_level)]).astype('float32'), + "mag": np.array([gal_mag]).astype('float32')} \ No newline at end of file diff --git a/autometacal/python/datasets/__init__.py b/autometacal/python/datasets/__init__.py index 7ee5215..12a30af 100644 --- a/autometacal/python/datasets/__init__.py +++ b/autometacal/python/datasets/__init__.py @@ -1,3 +1,4 @@ """gal_gen dataset.""" from .gal_gen import GalGen +from .CFIS import CFIS \ No newline at end of file diff --git a/notebooks/CFIS_dataset.ipynb b/notebooks/CFIS_dataset.ipynb new file mode 100644 index 0000000..e647094 --- /dev/null +++ b/notebooks/CFIS_dataset.ipynb @@ -0,0 +1,1104 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "id": "67632930", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n" + ] + } + ], + "source": [ + "%pylab inline\n", + "from autometacal.python.datasets import CFIS\n", + "import tensorflow_datasets as tfds\n", + "import tensorflow as tf" + ] + }, + { + "cell_type": "markdown", + "id": "639156a9", + "metadata": {}, + "source": [ + "## Loading the data\n", + "\n", + "The CFIS dataset includes simulated galaxies under simplistic CFIS-like\n", + "observing conditions." + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "e240a74d", + "metadata": {}, + "outputs": [], + "source": [ + "# We create a function to add noise on the fly for data augmentation\n", + "@tf.function\n", + "def add_noise(example):\n", + " im_noise = example['obs'] + example['noise_std'] * tf.random.normal([51,51])\n", + " return im_noise, example\n", + "\n", + "dset = tfds.load('CFIS/parametric_shear_1k', split='train')\n", + "dset = dset.map(add_noise)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "576c0307", + "metadata": {}, + "outputs": [], + "source": [ + "# Use ngmix to check these galaxies out\n", + "import ngmix\n", + "fitter = ngmix.gaussmom.GaussMom(fwhm=1.2)\n", + "s2n = []\n", + "mag = []\n", + "for im, example in dset:\n", + " wt = np.zeros_like(im) + 1.0/example['noise_std']**2\n", + " obs = ngmix.Observation(im.numpy(),\n", + " jacobian=ngmix.DiagonalJacobian(row=51/2, \n", + " col=51/2, \n", + " scale=0.187),\n", + " weight=wt)\n", + " res = fitter.go(obs)\n", + " s2n.append(res['s2n'])\n", + " mag.append(example['mag'].numpy().squeeze())\n", + "s2n = np.stack(s2n)\n", + "mag = np.stack(mag)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "32d4ecff", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEHCAYAAABfkmooAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAA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ULaXfPuvvjAGa2E3jQ3d3MHgdmAN3AHfmyGQ6k8697G/BVAHd/wsxCP/gLvN/MlpD7N3cKcDYQ95pCFwFX5H/+P8DfVvBakXHTMJS0u9cKfh4ueDxM7oP9i8Amd38zsAg4If+8lfsGZjYT+DTwDnc/B1hfcJ2jHPt3eELIy6Oo9ILUlYKFSGndQFBL6U8Kjv+Y3G5jmNnZwNwS13g9cBA4YGa/B7y74LnngPPyPxdWhP0d8LqCxz8BPpD/+UP59xepGwULkdL+FrjFzDYDqYLj/wBMzQ8/fZbckNKBsAvkN9vZDuwEbgc2Fzx9E/BVM/sRMFRwfB3wx0GCG/hL4E/z7/dhYNS+0iK1pkKCIlXIJ6rT7n7YzM4AHgR+392PNLhpIjWhBLdIdbqATfmNZQz4CwUKaWXqWYhMIDN7mNxeGoU+HMy4EkkqBQsREYmlBLeIiMRSsBARkVgKFiIiEkvBQkREYilYiIhILAULERGJ9f8B8omkGg2S1msAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "scatter(mag,s2n)\n", + "xlim(20,25)\n", + "yscale('log')\n", + "axvline(24.)\n", + "axhline(10.)\n", + "xlabel('mag_auto')\n", + "ylabel('SNR');" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "10b4ecad", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAEGCAYAAAB8Ys7jAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAQaUlEQVR4nO3df4hdZ53H8ffHWtH1BzZ2EoLt7CgbquLaVAetdHHVWDfaYvLHViwo41KZ/UOXCi5uVFhREMLCiu6iC0FdZ7G6zWq7CRVcw2jRBakmWm27aTeupLU0ZtqqqCsotd/9457Y2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e6L5K4pao+PP/Eqvptkn8APr6mFUt98GmEktQop1AkqVEGuCQ1ygCXpEYZ4JLUKANckhplgEtSowxwSWrU/wEj2Ns23EhqEwAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "hist(s2n,100,range=[0,50]);\n", + "xlabel('S2N');" + ] + }, + { + "cell_type": "markdown", + "id": "7d28ce51", + "metadata": {}, + "source": [ + "## Testing calibration bias with ngmix and autometacal" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "id": "35cbf6d9", + "metadata": {}, + "outputs": [], + "source": [ + "# We will measure moments with a fixed gaussian weight function\n", + "weight_fwhm = 1.2\n", + "fitter = ngmix.gaussmom.GaussMom(fwhm=weight_fwhm)\n", + "psf_fitter = ngmix.gaussmom.GaussMom(fwhm=weight_fwhm)\n", + "# these \"runners\" run the measurement code on observations\n", + "psf_runner = ngmix.runners.PSFRunner(fitter=psf_fitter)\n", + "runner = ngmix.runners.Runner(fitter=fitter)\n", + "\n", + "\n", + "rng = np.random.RandomState(31415)\n", + " \n", + "boot = ngmix.metacal.MetacalBootstrapper(\n", + " runner=runner, psf_runner=psf_runner,\n", + " rng=rng,\n", + " psf='gauss',\n", + " types=['noshear', '1p', '1m'],\n", + " fixnoise=True,\n", + ")\n", + "\n", + "def select(data, shear_type):\n", + " \"\"\"\n", + " select the data by shear type and size\n", + " Parameters\n", + " ----------\n", + " data: array\n", + " The array with fields shear_type and T\n", + " shear_type: str\n", + " e.g. 'noshear', '1p', etc.\n", + " Returns\n", + " -------\n", + " array of indices\n", + " \"\"\"\n", + "\n", + " w, = np.where(\n", + " (data['flags'] == 0) & (data['shear_type'] == shear_type)\n", + " )\n", + " return w\n", + "\n", + "\n", + "def make_struct(res, obs, shear_type):\n", + " \"\"\"\n", + " make the data structure\n", + " Parameters\n", + " ----------\n", + " res: dict\n", + " With keys 's2n', 'e', and 'T'\n", + " obs: ngmix.Observation\n", + " The observation for this shear type\n", + " shear_type: str\n", + " The shear type\n", + " Returns\n", + " -------\n", + " 1-element array with fields\n", + " \"\"\"\n", + " dt = [\n", + " ('flags', 'i4'),\n", + " ('shear_type', 'U7'),\n", + " ('s2n', 'f8'),\n", + " ('g', 'f8', 2),\n", + " ('T', 'f8'),\n", + " ('Tpsf', 'f8'),\n", + " ]\n", + " data = np.zeros(1, dtype=dt)\n", + " data['shear_type'] = shear_type\n", + "\n", + " if max(abs(res['e'])) > 5:\n", + " res['flags'] = -1\n", + " \n", + " data['flags'] = res['flags']\n", + " \n", + " if res['flags'] == 0:\n", + " data['s2n'] = res['s2n']\n", + " # for moments we are actually measureing e, the elliptity\n", + " data['g'] = res['e']\n", + " data['T'] = res['T']\n", + " else:\n", + " data['s2n'] = np.nan\n", + " data['g'] = np.nan\n", + " data['T'] = np.nan\n", + " data['Tpsf'] = np.nan\n", + "\n", + " # we only have one epoch and band, so we can get the psf T from the\n", + " # observation rather than averaging over epochs/bands\n", + " data['Tpsf'] = obs.psf.meta['result']['T']\n", + "\n", + " return data" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "id": "ab0a7c79", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:46<00:00, 21.70it/s]\n" + ] + } + ], + "source": [ + "from tqdm import tqdm\n", + "dlist = []\n", + "\n", + "jacobian = ngmix.DiagonalJacobian(row=51/2, col=51/2, scale=0.187)\n", + "\n", + "for im, example in tqdm(dset):\n", + " wt = np.zeros_like(im) + 1.0/example['noise_std']**2\n", + "\n", + " psf_obs = ngmix.Observation(\n", + " example['psf'].numpy(),\n", + " jacobian=jacobian,\n", + " )\n", + " \n", + " obs = ngmix.Observation(im.numpy(),\n", + " jacobian=jacobian,\n", + " psf=psf_obs,\n", + " weight=wt) \n", + " \n", + " resdict, obsdict = boot.go(obs)\n", + " \n", + " for stype, sres in resdict.items():\n", + " st = make_struct(res=sres, obs=obsdict[stype], shear_type=stype)\n", + " dlist.append(st)\n", + "\n", + "data = np.hstack(dlist)" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "id": "ded00c62", + "metadata": {}, + "outputs": [], + "source": [ + "w = select(data=data, shear_type='noshear')\n", + "w_1p = select(data=data, shear_type='1p')\n", + "w_1m = select(data=data, shear_type='1m')\n", + "\n", + "g = data['g'][w].mean(axis=0)\n", + "gerr = data['g'][w].std(axis=0) / np.sqrt(w.size)\n", + "g1_1p = data['g'][w_1p, 0].mean()\n", + "g1_1m = data['g'][w_1m, 0].mean()\n", + "R11 = (g1_1p - g1_1m)/0.02\n", + "\n", + "shear = g / R11\n", + "shear_err = gerr / R11\n", + "m = shear[0] / 0.02 - 1\n", + "merr = shear_err[0]/0.02\n", + "s2n = data['s2n'][w].mean()" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "id": "651f62ca", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ngmix results:\n", + "S/N: 17.1349\n", + "R11: 0.390659\n", + "m: -0.995659 +/- 5.53101 (99.7% conf)\n", + "c: 0.0575897 +/- 0.107426 (99.7% conf)\n" + ] + } + ], + "source": [ + "print('ngmix results:')\n", + "print('S/N: %g' % s2n)\n", + "print('R11: %g' % R11)\n", + "print('m: %g +/- %g (99.7%% conf)' % (m, merr*3))\n", + "print('c: %g +/- %g (99.7%% conf)' % (shear[1], shear_err[1]*3))" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "id": "471f7d6a", + "metadata": {}, + "outputs": [], + "source": [ + "# saving the reconv psf\n", + "reconv_psf = tf.convert_to_tensor(obsdict['noshear'].psf.image.reshape([1,51,51]).repeat(100,axis=0).astype('float32'))" + ] + }, + { + "cell_type": "markdown", + "id": "de690d8e", + "metadata": {}, + "source": [ + "#### Now doing the same thing with autometacal" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "id": "53497e53", + "metadata": {}, + "outputs": [], + "source": [ + "import autometacal \n", + "\n", + "@tf.function\n", + "def get_autometacal_shape(im, example):\n", + " method = lambda x: autometacal.get_moment_ellipticities(x, scale=0.187, fwhm=weight_fwhm)\n", + " return autometacal.get_metacal_response(im, example['psf'], reconv_psf, method)" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "id": "df67be4d", + "metadata": {}, + "outputs": [], + "source": [ + "dset = tfds.load('CFIS/parametric_shear_1k', split='train')\n", + "dset = dset.map(add_noise)\n", + "dset = dset.batch(100)" + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "id": "8d5f1bbd", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + " 0%| | 0/10 [00:00ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", + " 10%|██████████████▋ | 1/10 [00:04<00:38, 4.32s/it]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", + " 20%|█████████████████████████████▍ | 2/10 [00:08<00:33, 4.15s/it]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", + " 30%|████████████████████████████████████████████ | 3/10 [00:12<00:28, 4.02s/it]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", + " 40%|██████████████████████████████████████████████████████████▊ | 4/10 [00:16<00:23, 3.97s/it]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:5 out of the last 5 calls to .f at 0x7f19700ce9d0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for more details.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:5 out of the last 5 calls to .f at 0x7f19700ce9d0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for more details.\n", + " 50%|█████████████████████████████████████████████████████████████████████████▌ | 5/10 [00:20<00:20, 4.11s/it]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:6 out of the last 6 calls to .f at 0x7f19605861f0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for more details.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:6 out of the last 6 calls to .f at 0x7f19605861f0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for more details.\n", + " 60%|████████████████████████████████████████████████████████████████████████████████████████▏ | 6/10 [00:24<00:16, 4.19s/it]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", + " 70%|██████████████████████████████████████████████████████████████████████████████████████████████████████▉ | 7/10 [00:28<00:12, 4.17s/it]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", + " 80%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌ | 8/10 [00:33<00:08, 4.29s/it]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", + " 90%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 9/10 [00:37<00:04, 4.34s/it]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Roll\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", + "100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:42<00:00, 4.23s/it]\n" + ] + } + ], + "source": [ + "res_e = []\n", + "res_R = []\n", + "for im, example in tqdm(dset):\n", + " e, R = get_autometacal_shape(im, example)\n", + " res_e.append(e)\n", + " res_R.append(R)\n", + "res_e = np.concatenate(res_e)\n", + "res_R = np.concatenate(res_R)" + ] + }, + { + "cell_type": "code", + "execution_count": 111, + "id": "c8817eeb", + "metadata": {}, + "outputs": [], + "source": [ + "m = np.max(abs(res_e),axis=1) < 5\n", + "auto_g = res_e[m].mean(axis=0)\n", + "auto_R = res_R[m].mean(axis=0)" + ] + }, + { + "cell_type": "code", + "execution_count": 112, + "id": "e154b88d", + "metadata": {}, + "outputs": [], + "source": [ + "auto_gerr = res_e[m].std(axis=0) / np.sqrt(res_e[m].size)\n", + "auto_shear = auto_g / auto_R[0,0]\n", + "auto_shear_err = auto_gerr / auto_R[0,0]\n", + "auto_m = auto_shear[0] / 0.02 - 1\n", + "auto_merr = auto_shear_err[0]/0.02" + ] + }, + { + "cell_type": "code", + "execution_count": 113, + "id": "788ddb4b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "autometacal results:\n", + "R11: 0.141655\n", + "m: 0.0708357 +/- 4.65925 (99.7% conf)\n", + "c: 0.0845241 +/- 0.108777 (99.7% conf)\n" + ] + } + ], + "source": [ + "print('autometacal results:')\n", + "print('R11: %g' % auto_R[0,0])\n", + "print('m: %g +/- %g (99.7%% conf)' % (auto_m, auto_merr*3))\n", + "print('c: %g +/- %g (99.7%% conf)' % (auto_shear[1], auto_shear_err[1]*3))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5a9eb45d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "59621ca7", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a925850d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "326785b6", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 074f0a6e528eb208cd039d802c62bb2322056cc2 Mon Sep 17 00:00:00 2001 From: EiffL Date: Sun, 7 Nov 2021 03:25:03 +0100 Subject: [PATCH 2/2] Update demo notebook --- notebooks/CFIS_dataset.ipynb | 780 ++++++----------------------------- 1 file changed, 118 insertions(+), 662 deletions(-) diff --git a/notebooks/CFIS_dataset.ipynb b/notebooks/CFIS_dataset.ipynb index e647094..8965016 100644 --- a/notebooks/CFIS_dataset.ipynb +++ b/notebooks/CFIS_dataset.ipynb @@ -2,8 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, - "id": "67632930", + "execution_count": 1, "metadata": {}, "outputs": [ { @@ -23,7 +22,6 @@ }, { "cell_type": "markdown", - "id": "639156a9", "metadata": {}, "source": [ "## Loading the data\n", @@ -34,10 +32,66 @@ }, { "cell_type": "code", - "execution_count": 21, - "id": "e240a74d", + "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[1mDownloading and preparing dataset Unknown size (download: Unknown size, generated: Unknown size, total: Unknown size) to /local/home/flanusse/tensorflow_datasets/cfis/parametric_shear_1k/0.0.1...\u001b[0m\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='Generating splits...', max=1.0, style=ProgressStyle(descr…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=1.0, bar_style='info', description='Generating train examples...', layout=L…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='Shuffling cfis-train.tfrecord...', max=1000.0, style=Prog…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[1mDataset cfis downloaded and prepared to /local/home/flanusse/tensorflow_datasets/cfis/parametric_shear_1k/0.0.1. Subsequent calls will reuse this data.\u001b[0m\n" + ] + } + ], "source": [ "# We create a function to add noise on the fly for data augmentation\n", "@tf.function\n", @@ -51,8 +105,7 @@ }, { "cell_type": "code", - "execution_count": 22, - "id": "576c0307", + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -77,15 +130,14 @@ }, { "cell_type": "code", - "execution_count": 23, - "id": "32d4ecff", + "execution_count": 4, "metadata": { "scrolled": true }, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEHCAYAAABfkmooAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAkaElEQVR4nO3df5RcZZ3n8fe3KwV0g3YnSxyhSUgkTBhiIJE+/DDurKBucDDYA2JEcZ0Zx8js0dlwNBrUWWDEJTMZF90dR2WUIy4MhiFsNpngCXNIHDUSJCFBiJBRfiVpUIKhoyQVUun+7h9Vt1NdfW/dququH7fq8zrHY9etW7eevnTqW8/zfZ7vY+6OiIhIKR2NboCIiDQ/BQsREYmlYCEiIrEULEREJJaChYiIxFKwEBGRWJMa3YDxOPnkk33GjBmNboaINLln9h0E4E1TT2xwS5rDtm3bXnb3qZW8JtHBYsaMGWzdurXRzRCRJrf4mw8BsOrjFzW4Jc3BzJ6v9DUahhIRkVhNEyzM7A/M7Btmdq+Z/UWj2yMiIsfUNFiY2e1m9pKZPVF0/FIz22VmvzSz5QDu/qS7Xwu8H+irZbt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gG4MFy2wwFkCy/7h0A/hEAVPUJEbH94De5WUTWovRvbhaAKwF4vcbsbQBuLP/5fwD4hxpeSzRhXIaidveq6c+jpq9HUfpg/1sAB1T1TQBWAXhNrW8gIvMAfALAu1T1KgB7TNe5gLF/hzVfm6hZGCyI3E0DYPRS+pDp8YMonTYGEbkSwGKXa7wOwCsAzorIGwFcZ/reMwCuLv/Z3BH29wBea/r6hwA+UP7zrSj1+yFqGgYLInf/AOBeERlE9bLtPwOYKSI/BXAPgGEAZ+0uUD5sZxCljq9fRynQGLYA+EcROQygaHp8AMCfGgluAB8H8Jfl5a4/B1B1rjRR0NhIkKgO5UR1UlXPicjlAP4vgAWqej7koREFggluovp0AjhQPlhGAPwVAwW1Ms4siBpIRB5D6SwNsz83dlwRxRWDBREReWKCm4iIPDFYEBGRJwYLIiLyxGBBRESeGCyIiMgTgwUREXn6/8tBTjQNz5DgAAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] @@ -108,13 +160,12 @@ }, { "cell_type": "code", - "execution_count": 26, - "id": "10b4ecad", + "execution_count": 5, "metadata": {}, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAEGCAYAAAB8Ys7jAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAQaUlEQVR4nO3df4hdZ53H8ffHWtH1BzZ2EoLt7CgbquLaVAetdHHVWDfaYvLHViwo41KZ/UOXCi5uVFhREMLCiu6iC0FdZ7G6zWq7CRVcw2jRBakmWm27aTeupLU0ZtqqqCsotd/9457Y2ckkc2fm3pl57rxfEM45z71nzvdJyCdPnnuec1NVSJLa86T1LkCStDIGuCQ1ygCXpEYZ4JLUKANckhr15LW82MUXX1wTExNreUlJat6xY8ceqaqxhe1LBniSy4Cb5zU9H/hb4F+69gngJPDmqvrZ+X7WxMQER48e7b9qSR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rnsH9B8BOYAa4Lcn75hzyBeC+qrp/3qlfBi5PcuGKFCotkS0UrQndY1zvBe5N8jC9hwl9KcmNwATw5wucczzJ3wEfXclapX65AtfYS3JxkovmDG0GnkryfuCPgOuq6oUFT+591d3b6YW8dFpxBa614GXAP3SPcj0OPEGvnXKU3lPh/r37IomvVdUn555YVc8n+Xt6z7CWTis+jVCSGmULRZIaZYBLUqMMcElqlAEuSY0ywCWpUQa4JDXKAJekRhngktSo/wVUK5r5Q4ZQXwAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] @@ -132,7 +183,6 @@ }, { "cell_type": "markdown", - "id": "7d28ce51", "metadata": {}, "source": [ "## Testing calibration bias with ngmix and autometacal" @@ -140,8 +190,7 @@ }, { "cell_type": "code", - "execution_count": 56, - "id": "35cbf6d9", + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -153,7 +202,6 @@ "psf_runner = ngmix.runners.PSFRunner(fitter=psf_fitter)\n", "runner = ngmix.runners.Runner(fitter=fitter)\n", "\n", - "\n", "rng = np.random.RandomState(31415)\n", " \n", "boot = ngmix.metacal.MetacalBootstrapper(\n", @@ -235,15 +283,14 @@ }, { "cell_type": "code", - "execution_count": 57, - "id": "ab0a7c79", + "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:46<00:00, 21.70it/s]\n" + "100%|██████████| 1000/1000 [00:41<00:00, 24.05it/s]\n" ] } ], @@ -277,8 +324,7 @@ }, { "cell_type": "code", - "execution_count": 58, - "id": "ded00c62", + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -301,8 +347,7 @@ }, { "cell_type": "code", - "execution_count": 59, - "id": "651f62ca", + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -310,10 +355,10 @@ "output_type": "stream", "text": [ "ngmix results:\n", - "S/N: 17.1349\n", - "R11: 0.390659\n", - "m: -0.995659 +/- 5.53101 (99.7% conf)\n", - "c: 0.0575897 +/- 0.107426 (99.7% conf)\n" + "S/N: 17.1766\n", + "R11: 0.326126\n", + "m: -1.41607 +/- 7.39404 (99.7% conf)\n", + "c: 0.064798 +/- 0.135984 (99.7% conf)\n" ] } ], @@ -327,18 +372,16 @@ }, { "cell_type": "code", - "execution_count": 75, - "id": "471f7d6a", + "execution_count": 46, "metadata": {}, "outputs": [], "source": [ "# saving the reconv psf\n", - "reconv_psf = tf.convert_to_tensor(obsdict['noshear'].psf.image.reshape([1,51,51]).repeat(100,axis=0).astype('float32'))" + "reconv_psf = tf.convert_to_tensor(obsdict['noshear'].psf.image.reshape([1,51,51]).repeat(200,axis=0).astype('float32'))" ] }, { "cell_type": "markdown", - "id": "de690d8e", "metadata": {}, "source": [ "#### Now doing the same thing with autometacal" @@ -346,8 +389,7 @@ }, { "cell_type": "code", - "execution_count": 79, - "id": "53497e53", + "execution_count": 47, "metadata": {}, "outputs": [], "source": [ @@ -361,20 +403,20 @@ }, { "cell_type": "code", - "execution_count": 80, - "id": "df67be4d", + "execution_count": 59, "metadata": {}, "outputs": [], "source": [ "dset = tfds.load('CFIS/parametric_shear_1k', split='train')\n", "dset = dset.map(add_noise)\n", - "dset = dset.batch(100)" + "dset = dset.repeat(100)\n", + "dset = dset.batch(200)\n", + "dset = dset.prefetch(buffer_size=5)" ] }, { "cell_type": "code", - "execution_count": 81, - "id": "8d5f1bbd", + "execution_count": 60, "metadata": { "scrolled": true }, @@ -383,624 +425,44 @@ "name": "stderr", "output_type": "stream", "text": [ - " 0%| | 0/10 [00:00ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", - " 10%|██████████████▋ | 1/10 [00:04<00:38, 4.32s/it]" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", - " 20%|█████████████████████████████▍ | 2/10 [00:08<00:33, 4.15s/it]" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", - " 30%|████████████████████████████████████████████ | 3/10 [00:12<00:28, 4.02s/it]" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", - " 40%|██████████████████████████████████████████████████████████▊ | 4/10 [00:16<00:23, 3.97s/it]" + "100%|██████████| 500/500 [01:05<00:00, 7.66it/s]\n" ] - }, + } + ], + "source": [ + "res_e = []\n", + "res_R = []\n", + "for im, example in tqdm(dset):\n", + " e, R = get_autometacal_shape(im, example)\n", + " res_e.append(e)\n", + " res_R.append(R)\n", + "res_e = np.concatenate(res_e)\n", + "res_R = np.concatenate(res_R)" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": {}, + "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:5 out of the last 5 calls to .f at 0x7f19700ce9d0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for more details.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:5 out of the last 5 calls to .f at 0x7f19700ce9d0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for more details.\n", - " 50%|█████████████████████████████████████████████████████████████████████████▌ | 5/10 [00:20<00:20, 4.11s/it]" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:6 out of the last 6 calls to .f at 0x7f19605861f0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for more details.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:6 out of the last 6 calls to .f at 0x7f19605861f0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for more details.\n", - " 60%|████████████████████████████████████████████████████████████████████████████████████████▏ | 6/10 [00:24<00:16, 4.19s/it]" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", - " 70%|██████████████████████████████████████████████████████████████████████████████████████████████████████▉ | 7/10 [00:28<00:12, 4.17s/it]" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", - " 80%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌ | 8/10 [00:33<00:08, 4.29s/it]" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", - " 90%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 9/10 [00:37<00:04, 4.34s/it]" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Roll\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:Using a while_loop for converting Addons>ResamplerGrad\n", - "100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:42<00:00, 4.23s/it]\n" - ] + "data": { + "text/plain": [ + "(1538.4615384615386, 'measurements per sec')" + ] + }, + "execution_count": 61, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "res_e = []\n", - "res_R = []\n", - "for im, example in tqdm(dset):\n", - " e, R = get_autometacal_shape(im, example)\n", - " res_e.append(e)\n", - " res_R.append(R)\n", - "res_e = np.concatenate(res_e)\n", - "res_R = np.concatenate(res_R)" + "100000/65, 'measurements per sec' # Batch of 200" ] }, { "cell_type": "code", - "execution_count": 111, - "id": "c8817eeb", + "execution_count": 62, "metadata": {}, "outputs": [], "source": [ @@ -1011,8 +473,7 @@ }, { "cell_type": "code", - "execution_count": 112, - "id": "e154b88d", + "execution_count": 63, "metadata": {}, "outputs": [], "source": [ @@ -1025,8 +486,7 @@ }, { "cell_type": "code", - "execution_count": 113, - "id": "788ddb4b", + "execution_count": 64, "metadata": {}, "outputs": [ { @@ -1034,9 +494,9 @@ "output_type": "stream", "text": [ "autometacal results:\n", - "R11: 0.141655\n", - "m: 0.0708357 +/- 4.65925 (99.7% conf)\n", - "c: 0.0845241 +/- 0.108777 (99.7% conf)\n" + "R11: 0.188488\n", + "m: -0.829483 +/- 0.373999 (99.7% conf)\n", + "c: 0.00575358 +/- 0.00748643 (99.7% conf)\n" ] } ], @@ -1050,7 +510,6 @@ { "cell_type": "code", "execution_count": null, - "id": "5a9eb45d", "metadata": {}, "outputs": [], "source": [] @@ -1058,7 +517,6 @@ { "cell_type": "code", "execution_count": null, - "id": "59621ca7", "metadata": {}, "outputs": [], "source": [] @@ -1066,7 +524,6 @@ { "cell_type": "code", "execution_count": null, - "id": "a925850d", "metadata": {}, "outputs": [], "source": [] @@ -1074,7 +531,6 @@ { "cell_type": "code", "execution_count": null, - "id": "326785b6", "metadata": {}, "outputs": [], "source": [] @@ -1082,7 +538,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -1096,7 +552,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.8.6" } }, "nbformat": 4,