title: How to create not squared images using ccfits?
body: <p>I'd like to create a not squared set of images using ccfits. I can make a single one in the primaryHDU, like this:</p>
  
  <pre><code>long axes[2] = { jmax, imax };   
  std::auto_ptr&lt;CCfits::FITS&gt; pFits(0);
  pFits.reset ( new CCfits::FITS ( "fitfile.fits", FLOAT_IMG, 2, axes ) );
  
  std::valarray&lt;double&gt; h2a0array ( jmax * imax );
  for ( int i = 0 ; i &lt; imax ; i++ 
    for ( int j = 0 ; j &lt; jmax ; j++ )
      h2a0array [ j + jmax * i ] = i + j;  
  
  pFits-&gt;pHDU().write  ( fpixel, imax * jmax, h2a0array );
  </code></pre>
  
  <p>But I don't know how to add other not-squared images to my FITS file. I guess I have to use the CCFITS::addImage function, but can only obtain squared images using it:</p>
  
  <pre><code>long fpixel ( 1 );
  std::vector&lt;long&gt; extAx ( 2, dim );
  CCfits::ExtHDU* imageExt2 = pFits-&gt;addImage ( "h2a0array", FLOAT_IMG, extAx );
  imageExt2-&gt;write ( fpixel, imax * jmax, h2a0array );
  </code></pre>
  
  <p>The extAx vector contains only two values, the first is the dimension (1D, 2D, 3D) of the image to add to the FITS file, the second is its size. I don't know any other way to add an image to a FITS file. If someone does, your help is strongly welcome!</p>
  
  <p>Thanks,
  Arnaud.</p>