{"id":204,"date":"2017-07-19T11:34:05","date_gmt":"2017-07-19T14:34:05","guid":{"rendered":"http:\/\/web.inf.ufpr.br\/vri\/?page_id=204"},"modified":"2017-07-19T11:34:05","modified_gmt":"2017-07-19T14:34:05","slug":"peter-frank-perroni-msc-2013","status":"publish","type":"page","link":"https:\/\/web.inf.ufpr.br\/vri\/alumni\/peter-frank-perroni-msc-2013\/","title":{"rendered":"Peter Frank Perroni, Msc, 2013"},"content":{"rendered":"<div id=\"viewlet-below-content-title\"><\/div>\n<div id=\"content-core\">\n<div id=\"parent-fieldname-text-a9b229145f42457f841d4155e3a1b6dd\" class=\"\">\n<h2>Point Spread Function Estimation of Solar Surface Images with a Cooperative Particle Swarm Optimization on GPUs<\/h2>\n<p>&nbsp;<\/p>\n<p><b>Author: <\/b>Peter Frank Perroni<\/p>\n<p><b>Supervisor: <\/b><span class=\"link-external\"><a href=\"http:\/\/www.inf.ufpr.br\/danielw\">Daniel Weingaertner<\/a><\/span><\/p>\n<h3 id=\"_mcePaste\">Abstract<\/h3>\n<p>We present a method for estimating the point spread function (PSF) of solar surface images acquired from ground telescopes and degraded by atmosphere.\u00a0The estimation is done by retrieving the wavefront phase using a set of short exposures, the speckle reconstruction of the observed object and a PSF model\u00a0parametrized by Zernike polynomials. Estimates of the wavefront phase and PSF are computed by minimizing an error function with a cooperative particle\u00a0swarm optimization method, implemented in OpenCL to take advantage of highly parallel GPUs. A calibration method is presented to adjust the algorithm\u00a0parameters for low cost results, providing solid estimations for either low frequency and high frequency images. Results show that the method has\u00a0a fast convergence and is robust to noise degradation. Experiments run on a NVidia Tesla C2050 were able to compute 100 PSFs with 50 Zernike polynomials\u00a0in ~36 minutes. The algorithm is also not affected by the number of Zernikes used, i.e., execution time increased only 17% when the number\u00a0of Zernike coeffcients increased tenfold, from 50 to 500.<\/p>\n<p>&nbsp;<\/p>\n<h3>Dissertation<\/h3>\n<p>The complete dissertation is available for <a class=\"external-link\" href=\"http:\/\/www.inf.ufpr.br\/vri\/alumni\/2013-PeterPerroni\/GPU-PSF-Estimation-with-CPSO-dissertation.pdf\">download<\/a>.<\/p>\n<h3>Source Code<\/h3>\n<p>This method was implemented in C++ with <a class=\"external-link\" href=\"http:\/\/www.khronos.org\/opencl\/\">OpenCL<\/a> and <a class=\"external-link\" href=\"http:\/\/www.openmp.org\">OpenMP<\/a>.<\/p>\n<p>The source code can be downloaded <a class=\"external-link\" href=\"http:\/\/www.inf.ufpr.br\/vri\/alumni\/2013-PeterPerroni\/GPU-PSF-Estimation-with-CPSO-source.tar.gz\">here<\/a>.<\/p>\n<p>Before compiling the source code:<\/p>\n<ul>\n<li>Download this <a class=\"external-link\" href=\"http:\/\/www.inf.ufpr.br\/vri\/alumni\/2013-PeterPerroni\/Makefile\">Makefile<\/a> and adjust the following parameters:\n<ul>\n<li>CFITSIO_HOME: The home path of <a class=\"external-link\" href=\"http:\/\/heasarc.gsfc.nasa.gov\/fitsio\/\">CFITSIO<\/a>.<\/li>\n<li>VIENNACL_HOME: The home path of <a class=\"external-link\" href=\"http:\/\/viennacl.sourceforge.net\/\">ViennaCL<\/a>.<\/li>\n<li>CUDA_HOME: The home path of CUDA (used by <a class=\"external-link\" href=\"http:\/\/www.nvidia.com\/\">NVIDIA<\/a> graphical cards). In the case the GPU is not CUDA, this parameter can point to the GPU include home path.<\/li>\n<li>CUDA_SDK: The home path of CUDA SDK\u00a0(used by NVIDIA graphical cards).\u00a0In the case the GPU is not CUDA, this parameter must be adjusted accordingly.<\/li>\n<\/ul>\n<\/li>\n<li>Open the source file kippe.cpp and adjust the parameters\u00a0wavelength,\u00a0image scale and\u00a0telescope diameter, according to the physical specifications of the telescope.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Code Documentation<\/h3>\n<p>The complete code documentation can be browsed\u00a0<a class=\"external-link\" href=\"http:\/\/www.inf.ufpr.br\/vri\/alumni\/2013-PeterPerroni\/GPU-PSF-Estimation-with-CPSO-html\/index.html\">here<\/a>.<\/p>\n<p>It is also available for download <a class=\"external-link\" href=\"http:\/\/www.inf.ufpr.br\/vri\/alumni\/2013-PeterPerroni\/GPU-PSF-Estimation-with-CPSO-html.tar.gz\">here<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h3>Usage Instructions<\/h3>\n<pre>                       POINT SPREAD FUNCTION ESTIMATION OF SOLAR\r\n                      SURFACE IMAGES WITH A COOPERATIVE PARTICLE\r\n                              SWARM OPTIMIZATION ON GPUS\r\n\r\nUsage: kippe [-h] | [-testgpu] | [-listgpu] |\r\n             [-rms_contrast -obj &lt;image&gt; -isz &lt;image_width&gt;] |\r\n             [-sum -obj &lt;image&gt; -isz &lt;image_width&gt;] |\r\n             [-obj &lt;object&gt; -isz &lt;image_width&gt; -fsz &lt;fft_width&gt; -z &lt;num_zernikes&gt;\r\n               [[-img &lt;image&gt; -out &lt;output_path&gt; -s &lt;num_swarms&gt; -p &lt;num_particles&gt;\r\n                 -c &lt;num_cycles&gt; -w &lt;w_val&gt; -c1 &lt;c1_val&gt; -c2 &lt;c2_val&gt; -reset &lt;reset_factor&gt;] |\r\n               [-validation -nval &lt;num_validations&gt; -ranksz &lt;rank_size&gt; {-noise &lt;noise-level&gt;}] |\r\n               [-gen_imgs &lt;num_artificial_images&gt;]]\r\n              {-r &lt;coef_range&gt;} {-fixedrand} {-statistics} {-devices &lt;device_id_to_use&gt;}\r\n              {-parallel &lt;n_threads&gt;}]\r\nwhere: \r\n\t-h            This help message.\r\n\t-testgpu      Test all GPUs available.\r\n\t-listgpu      Get the list of device ids available on the system.\r\n\t-sum          Sum a 3D FITS file and generate a 2D FITS file as output.\r\n\t-rms_contrast Calculate the image intensity.\r\n\t-obj          The path to the FITS file containing the Object.\r\n\t-img          The path to either a FITS file containing a 2D\/3D Image\r\n\t              or the path to a folder containing multiple 2D Image files.\r\n\t-out          The output folder where the data will be saved.\r\n\t-isz          The widh of the input image.\r\n\t-fsz          The width of the FFT to be calculated.\r\n\t-z            The number of Zernikes to be calculated.\r\n\t-r            The range for the Zernike coefficients. If not provided, the value 2 will be used.\r\n\t-s            The number of swarms to be created.\r\n\t-p            The number of particles to be used on every swarm.\r\n\t-c            The number of cycles to run the CPSO.\r\n\t-w            The Inertia weight W.\r\n\t-c1           The Acceleration coefficient C1 (cognitive).\r\n\t-c2           The Acceleration coefficient C2 (social).\r\n\t-reset        The factor for re-initialization of inactive particles [0-1].\r\n\t-validation   If provided, the tool will run on Validation mode.\r\n\t-nval         The number of validations to be executed.\r\n\t-ranksz       The rank size to store the best and worst values.\r\n\t-noise        The Poisson noise level to be added to the artificial image: 0 (default), 1, .. 700.\r\n\t-gen_imgs     If provided, the tool will run on Generation Images mode.\r\n\t              Specify the number of artificial images to be generated in the 3D output FITS file.\r\n\t-fixedrand    If provided, the Random Number Generator seed will be fixed at program startup.\r\n\t-statistics   If provided, the statistics will be printed on standard output.\r\n\t-devices      The list of device ids (separated by comma and no space) that should be used.\r\n\t              To get the list of device ids, run the program with the option -listgpu.\r\n\t-parallel     Define the number of threads to be used. For basic image processing, it is also\r\n\t              the number of CPSO's to be executed in parallel. The default is 1 thread.\r\n\r\n<\/pre>\n<pre><\/pre>\n<p>&nbsp;<\/p>\n<h3>Results<\/h3>\n<p>The images obtained by this method can be found <a class=\"external-link\" href=\"http:\/\/www.inf.ufpr.br\/vri\/alumni\/2013-PeterPerroni\/images\/index.html\">here<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Point Spread Function Estimation of Solar Surface Images with a Cooperative Particle Swarm Optimization on GPUs &nbsp; Author: Peter Frank Perroni Supervisor: Daniel Weingaertner Abstract We present a method for estimating the point spread function (PSF) of solar surface images <a href=\"https:\/\/web.inf.ufpr.br\/vri\/alumni\/peter-frank-perroni-msc-2013\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":14,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-204","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/pages\/204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/comments?post=204"}],"version-history":[{"count":1,"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/pages\/204\/revisions"}],"predecessor-version":[{"id":206,"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/pages\/204\/revisions\/206"}],"up":[{"embeddable":true,"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/pages\/14"}],"wp:attachment":[{"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/media?parent=204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}