{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ec9d6154",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pynsn as nsn\n",
    "from pynsn.image import pil_image\n",
    "\n",
    "dot_array = nsn.DotArray(target_area_radius=100)\n",
    "dot_array.add( [nsn.Dot(xy=(-65, 50), diameter=20, attribute=\"green\"),\n",
    "                nsn.Dot(xy=(25, 35), diameter=25, attribute=\"blue\"),\n",
    "                nsn.Dot(xy=(60, -50), diameter=12, attribute=\"darkmagenta\"),\n",
    "                nsn.Dot(xy=(-40, -20), diameter=37, attribute=\"orange\"),\n",
    "                nsn.Dot(xy=(-10, -5), diameter=14, attribute=\"black\")])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bd36ef47",
   "metadata": {},
   "source": [
    "Making a picture of stimulus"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1a0021e9",
   "metadata": {},
   "outputs": [],
   "source": [
    "pil_image.create(dot_array)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d2cbfa8b",
   "metadata": {},
   "source": [
    "Inspect properties of the nsn stimulus"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d3936a5b",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(dot_array)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f524dbf5",
   "metadata": {},
   "source": [
    "Changing some colours"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d7502f23",
   "metadata": {},
   "outputs": [],
   "source": [
    "my_colours = nsn.ImageColours(target_area=\"#EEEEEE\") \n",
    "pil_image.create(dot_array, colours=my_colours)"
   ]
  }
 ],
 "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.10.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
