View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

enlarging images by copying?

Arp wrote on May 10, 2010

Hi!

I go a fits image which has 2x2 pixels, they have the value:
1 0
0 1

Now, I want to copy those pixels in x and y direction by an integer factor so that the new image will have a dimension of 3040x2016 containing the same pattern like

10101010101010101
01010101010101010

and so on.

I tried blkrep, but it creates something like
00001111
11110000

Can you suggest another way to this please?

Mike Fitzpatrick wrote on May 10, 2010


cl> artdata
ar> mkpattern foo.fits pattern=checker v1=0 v2=1 ncols=3040 nlines=2016

Arp wrote on May 10, 2010

Thanks! that works!

I created a file with the pattern

01
10

But I am having problems creating the patterns
10
00

and
00
01

I used grid as a pattern option but it gives me
01
00

Mike Fitzpatrick wrote on May 10, 2010

For MKPATTERN the options for the pattern are spelled out in the help page. Note you can do things like invert the v1/v2 values or copy out image sections (e.g. "
  • " to subsample by 3) to invert the pattern or create an offset. Otherwise, have a look at the IMEXPR task where you can use the array index in an expression to create some sort of pattern. You also have the option of copying an image/section into the section of an output image to create an arbitrary repeating pattern. </div> --- *Last post on May 10, 2010*