RegExamples: examples of regions

Summary

This document shows examples of spatial regions generated using the regdisp program.

Description

The following examples illustrate the region masks you can use in programs such as regcnts. They were created using the regdisp program. Remember that regions can be specified with or without parentheses and with or without commas:
  circle 512 512 10
and:
  circle(512,512,10)
The examples use the both methods, more or less randomly.

Annulus

annulus calling sequence #1: xcenter ycenter inner_radius outer_radius
  $ regdisp snr.fits "annulus 512 512 3 12"
  regions: annulus 512 512 3 12
  ...........................
  ...........................
  .........111111111.........
  .......1111111111111.......
  ......111111111111111......
  .....11111111111111111.....
  ....1111111111111111111....
  ...111111111111111111111...
  ...111111111111111111111...
  ..11111111111111111111111..
  ..11111111111111111111111..
  ..111111111.....111111111..
  ..111111111.....111111111..
  ..111111111.....111111111..
  ..111111111.....111111111..
  ..111111111.....111111111..
  ..11111111111111111111111..
  ..11111111111111111111111..
  ...111111111111111111111...
  ...111111111111111111111...
  ....1111111111111111111....
  .....11111111111111111.....
  ......111111111111111......
  .......1111111111111.......
  .........111111111.........
  ...........................
  ...........................
  LL corner: 499,499
  UR corner: 525,525
  
annulus calling sequence #2: xcenter ycenter radius1 radius2 ... radiusn
  $ regdisp snr.fits "annulus 512 512 3 6 9 12"
  regions: annulus 512 512 3 6 9 12
  ...........................
  ...........................
  .........333333333.........
  .......3333333333333.......
  ......333333333333333......
  .....33332222222223333.....
  ....3333222222222223333....
  ...333322222222222223333...
  ...333222211111112222333...
  ..33322221111111112222333..
  ..33322211111111111222333..
  ..333222111.....111222333..
  ..333222111.....111222333..
  ..333222111.....111222333..
  ..333222111.....111222333..
  ..333222111.....111222333..
  ..33322211111111111222333..
  ..33322221111111112222333..
  ...333222211111112222333...
  ...333322222222222223333...
  ....3333222222222223333....
  .....33332222222223333.....
  ......333333333333333......
  .......3333333333333.......
  .........333333333.........
  ...........................
  ...........................
  LL corner: 499,499
  UR corner: 525,525
  
annulus calling sequence #3: xcenter ycenter inner_radius outer_radius n=[number]
  $ regdisp snr.fits "annulus 512 512 3 12 n=3"
  regions: annulus 512 512 3 12 n=3
  ...........................
  ...........................
  .........333333333.........
  .......3333333333333.......
  ......333333333333333......
  .....33332222222223333.....
  ....3333222222222223333....
  ...333322222222222223333...
  ...333222211111112222333...
  ..33322221111111112222333..
  ..33322211111111111222333..
  ..333222111.....111222333..
  ..333222111.....111222333..
  ..333222111.....111222333..
  ..333222111.....111222333..
  ..333222111.....111222333..
  ..33322211111111111222333..
  ..33322221111111112222333..
  ...333222211111112222333...
  ...333322222222222223333...
  ....3333222222222223333....
  .....33332222222223333.....
  ......333333333333333......
  .......3333333333333.......
  .........333333333.........
  ...........................
  ...........................
  LL corner: 499,499
  UR corner: 525,525
  

box

box calling sequence #1: xcenter ycenter xwidth yheight (angle)
  $ regdisp snr.fits "box 512 512 9 12"
  regions: box 512 512 9 12
  .............
  .............
  ..111111111..
  ..111111111..
  ..111111111..
  ..111111111..
  ..111111111..
  ..111111111..
  ..111111111..
  ..111111111..
  ..111111111..
  ..111111111..
  ..111111111..
  ..111111111..
  .............
  .............
  LL corner: 506,505
  UR corner: 518,520

  $ regdisp snr.fits "box 512 512 9 12 45"
  regions: box 512 512 9 12 45
  ...................
  ...................
  ........1..........
  .......111.........
  ......11111........
  .....1111111.......
  ....111111111......
  ...11111111111.....
  ..1111111111111....
  ...1111111111111...
  ....1111111111111..
  .....11111111111...
  ......111111111....
  .......1111111.....
  ........11111......
  .........111.......
  ..........1........
  ...................
  ...................
  LL corner: 503,503
  UR corner: 521,521
  
box calling sequence #2: xcenter ycenter xw1 yh1 xw2 yh2 ... xwn yhn (angle)
  $ regdisp snr.fits "box 512 512 3 4 6 8 9 12 12 15 45"
  regions: box 512 512 3 4 6 8 9 12 12 15 45
  .......................
  .......................
  ..........3............
  .........333...........
  ........33233..........
  .......3322233.........
  ......332222233........
  .....33222112233.......
  ....3322211112233......
  ...33222111.112233.....
  ..33222111...112233....
  ...332211.....112233...
  ....332211...11122233..
  .....332211.11122233...
  ......3322111122233....
  .......33221122233.....
  ........332222233......
  .........3322233.......
  ..........33233........
  ...........333.........
  ............3..........
  .......................
  .......................
  LL corner: 501,501
  UR corner: 523,523
  
box calling sequence #3: xcenter ycenter xwlo yhlo xwhi yhhi n=[number] (angle)
  $ regdisp snr.fits "box 512 512 3 4 12 15 n=3"
  regions: box 512 512 3 4 12 15 n=3
  ................
  ................
  ..333333333333..
  ..333333333333..
  ..322222222233..
  ..322222222233..
  ..322111111233..
  ..3221...11233..
  ..3221...11233..
  ..3221...11233..
  ..3221...11233..
  ..322111111233..
  ..322111111233..
  ..322222222233..
  ..322222222233..
  ..333333333333..
  ..333333333333..
  ................
  ................
  LL corner: 505,503
  UR corner: 520,521

  $ regdisp snr.fits "box 512 512 3 4 12 15 n=3 45"
  regions: box 512 512 3 4 12 15 n=3 45
  .......................
  .......................
  ..........3............
  .........333...........
  ........33233..........
  .......3322233.........
  ......332222233........
  .....33222112233.......
  ....3322211112233......
  ...33222111.112233.....
  ..33222111...112233....
  ...332211.....112233...
  ....332211...11122233..
  .....332211.11122233...
  ......3322111122233....
  .......33221122233.....
  ........332222233......
  .........3322233.......
  ..........33233........
  ...........333.........
  ............3..........
  .......................
  .......................
  LL corner: 501,501
  UR corner: 523,523
  

bpanda

bpanda calling sequence #1: xcen ycen ang1 ang2 nang xwlo yhlo xwhi yhhi nrad (ang)
  $ regdisp snr.fits "bpanda(512 512 30 300 3 3 4 9 12 3)"
  regions: bpanda(512 512 30 300 3 3 4 9 12 3)
  .............
  .............
  ..633333333..
  ..663333333..
  ..652222223..
  ..654111123..
  ..654...12...
  ..654........
  ..654........
  ..654........
  ..687777.....
  ..987777.....
  ..9888888....
  ..9999999....
  .............
  .............
  LL corner: 506,505
  UR corner: 518,520

  $ regdisp snr.fits "bpanda(512 512 30 300 3 3 4 9 12 3 45)"
  regions: bpanda(512 512 30 300 3 3 4 9 12 3 45)
  ..................
  ..................
  ........3.........
  .......333........
  ......33233.......
  .....332223.......
  ....332211........
  ...332211.........
  ..665511..........
  ...6654...........
  ....6654...77.....
  .....6654.778899..
  ......665778899...
  .......6988899....
  ........99899.....
  .........999......
  ..........9.......
  ..................
  ..................
  LL corner: 503,503
  UR corner: 520,521
  

circle

circle calling sequence #1: xcenter ycenter radius
  $ regdisp snr.fits "circle 512 512 10"
  regions: circle 512 512 10
  .......................
  .......................
  .......111111111.......
  ......11111111111......
  ....111111111111111....
  ....111111111111111....
  ...11111111111111111...
  ..1111111111111111111..
  ..1111111111111111111..
  ..1111111111111111111..
  ..1111111111111111111..
  ..1111111111111111111..
  ..1111111111111111111..
  ..1111111111111111111..
  ..1111111111111111111..
  ..1111111111111111111..
  ...11111111111111111...
  ....111111111111111....
  ....111111111111111....
  ......11111111111......
  .......111111111.......
  .......................
  .......................
  LL corner: 501,501
  UR corner: 523,523
  

ellipse

ellipse calling sequence #1: xcenter ycenter xwidth yheight (angle)
  $ regdisp snr.fits "ellipse 512 512 9 12"
  regions: ellipse 512 512 9 12
  .....................
  .....................
  .......1111111.......
  ......111111111......
  .....11111111111.....
  ....1111111111111....
  ...111111111111111...
  ...111111111111111...
  ..11111111111111111..
  ..11111111111111111..
  ..11111111111111111..
  ..11111111111111111..
  ..11111111111111111..
  ..11111111111111111..
  ..11111111111111111..
  ..11111111111111111..
  ..11111111111111111..
  ..11111111111111111..
  ..11111111111111111..
  ...111111111111111...
  ...111111111111111...
  ....1111111111111....
  .....11111111111.....
  ......111111111......
  .......1111111.......
  .....................
  .....................
  LL corner: 502,499
  UR corner: 522,525

  $ regdisp snr.fits "ellipse 512 512 9 12 45"
  regions: ellipse 512 512 9 12 45
  .........................
  .........................
  ......1111111............
  .....1111111111..........
  ....1111111111111........
  ...111111111111111.......
  ..11111111111111111......
  ..111111111111111111.....
  ..1111111111111111111....
  ..1111111111111111111....
  ..11111111111111111111...
  ..11111111111111111111...
  ..111111111111111111111..
  ...11111111111111111111..
  ...11111111111111111111..
  ....1111111111111111111..
  ....1111111111111111111..
  .....111111111111111111..
  ......11111111111111111..
  .......111111111111111...
  ........1111111111111....
  ..........1111111111.....
  ............1111111......
  .........................
  .........................
  LL corner: 500,500
  UR corner: 524,524
  
ellipse calling sequence #2: xcenter ycenter xw1 yh1 xw2 yh2 ... xwn yhn (angle)
  $ regdisp snr.fits "ellipse 512 512 3 4 6 8 9 12 12 15 45"
  regions: ellipse 512 512 3 4 6 8 9 12 12 15 45
  ...............................
  ...............................
  .........3333333...............
  .......333333333333............
  .....3333333333333333..........
  ....333332222222333333.........
  ....3333222222222233333........
  ...333322222222222223333.......
  ...3332222222122222223333......
  ..333222221111111222223333.....
  ..3332222111111111122223333....
  ..3332222111111111112222333....
  ..33322221111...111112223333...
  ..3332221111......1112222333...
  ..3332222111......1111222333...
  ..3332222111.......1112222333..
  ...3332221111......1112222333..
  ...3332222111......1111222333..
  ...333322211111...11112222333..
  ....3332222111111111112222333..
  ....3333222211111111112222333..
  .....333322222111111122222333..
  ......3333222222212222222333...
  .......333322222222222223333...
  ........3333322222222223333....
  .........333333222222233333....
  ..........3333333333333333.....
  ............333333333333.......
  ...............3333333.........
  ...............................
  ...............................
  LL corner: 497,497
  UR corner: 527,527
  
ellipse calling sequence #3: xcenter ycenter xwlo yhlo xwhi yhhi n=[number] (angle)
  $ regdisp snr.fits "ellipse 512 512 3 4 12 15 n=3"
  regions: ellipse 512 512 3 4 12 15 n=3
  ...........................
  ...........................
  .........333333333.........
  ........33333333333........
  ......333333333333333......
  .....33333322222333333.....
  .....33332222222223333.....
  ....3333222222222223333....
  ...333322222222222223333...
  ...333222221111122222333...
  ...333222211111112222333...
  ..33322221111111112222333..
  ..33322211111111111222333..
  ..3332221111...1111222333..
  ..333222111.....111222333..
  ..333222111.....111222333..
  ..333222111.....111222333..
  ..333222111.....111222333..
  ..333222111.....111222333..
  ..3332221111...1111222333..
  ..33322211111111111222333..
  ..33322221111111112222333..
  ...333222211111112222333...
  ...333222221111122222333...
  ...333322222222222223333...
  ....3333222222222223333....
  .....33332222222223333.....
  .....33333322222333333.....
  ......333333333333333......
  ........33333333333........
  .........333333333.........
  ...........................
  ...........................
  LL corner: 499,496
  UR corner: 525,528
  

epanda

epanda calling sequence #1: xcen ycen ang1 ang2 nang xwlo yhlo xwhi yhhi nrad (ang)
  $ regdisp snr.fits "epanda(512 512 30 300 3 3 4 9 12 3)"
  regions: epanda(512 512 30 300 3 3 4 9 12 3)
  .....................
  .....................
  .......3333333.......
  ......333333333......
  .....33332223333.....
  ....6632222222333....
  ...666222222222333...
  ...665521111122233...
  ..66655411111122333..
  ..665554111111222....
  ..6655444...1112.....
  ..665544.....1.......
  ..665544.............
  ..665544.............
  ..665544.............
  ..665547.............
  ..6658777............
  ..66888777777........
  ..99988777777........
  ...99888777778.......
  ...999888888888......
  ....99988888889......
  .....99998889999.....
  ......999999999......
  .......9999999.......
  .....................
  .....................
  LL corner: 502,499
  UR corner: 522,525
  

field

field calling sequence #1: [none]
  $ regdisp -s "490 510 490 510 1" snr.fits "field; -circle 500 500 5"
  regions: field; -circle 500 500 5
  111111111111111111111
  111111111111111111111
  111111111111111111111
  111111111111111111111
  111111111111111111111
  111111111111111111111
  11111111.....11111111
  1111111.......1111111
  111111.........111111
  111111.........111111
  111111.........111111
  111111.........111111
  111111.........111111
  1111111.......1111111
  11111111.....11111111
  111111111111111111111
  111111111111111111111
  111111111111111111111
  111111111111111111111
  111111111111111111111
  111111111111111111111
  LL corner: 490,490
  UR corner: 510,510
  

line

line calling sequence #1: x1 y1 x2 y2
  $ regdisp snr.fits "line 502 504 516 518; line 502 518 516 504"
  regions: line 502 504 516 518; line 502 518 516 504
  ...................
  ...................
  ..2.............1..
  ...2...........1...
  ....2.........1....
  .....2.......1.....
  ......2.....1......
  .......2...1.......
  ........2.1........
  .........1.........
  ........1.2........
  .......1...2.......
  ......1.....2......
  .....1.......2.....
  ....1.........2....
  ...1...........2...
  ..1.............2..
  ...................
  ...................
  LL corner: 500,502
  UR corner: 518,520
  

panda

panda calling sequence #1: xcen ycen ang1 ang2 nang irad orad nrad
  $ regdisp snr.fits "panda(512 512 30 300 3 5 10 3)"
  regions: panda(512 512 30 300 3 5 10 3)
  ......................
  ......................
  .......333333333......
  ......63322222333.....
  ....666222222222333...
  ....665521111122233...
  ...66554411111112233..
  ..6655444.....1112....
  ..665544.......11.....
  ..65544...............
  ..65544...............
  ..65544...............
  ..65544...............
  ..65544...............
  ..665577..............
  ..6658777.............
  ...99887777777........
  ....99888777778.......
  ....999888888888......
  ......9998888899......
  .......999999999......
  ......................
  ......................
  LL corner: 501,501
  UR corner: 522,523
  

pie

pie calling sequence #1: xcenter ycenter angle1 angle2
  $ regdisp snr.fits "circle(512,512,10) & pie(512 512 0 270)"
  regions: circle(512,512,10)&pie(512 512 0 270)
  .......................
  .......................
  .......111111111.......
  ......11111111111......
  ....111111111111111....
  ....111111111111111....
  ...11111111111111111...
  ..1111111111111111111..
  ..1111111111111111111..
  ..1111111111111111111..
  ..1111111111111111111..
  ..1111111111...........
  ..1111111111...........
  ..1111111111...........
  ..1111111111...........
  ..1111111111...........
  ...111111111...........
  ....11111111...........
  ....11111111...........
  ......111111...........
  .......11111...........
  .......................
  .......................
  LL corner: 501,501
  UR corner: 523,523
  
pie calling sequence #2: xcenter ycenter angle1 angle2 (angle3) (angle4) (angle5) ...
  $ regdisp snr.fits "circle(512,512,10)&pie(512 512 0 90 180 270)"
  regions: circle(512,512,10)&pie(512 512 0 90 180 270)
  .......................
  .......................
  .......333332222.......
  ......33333322222......
  ....333333332222222....
  ....333333332222222....
  ...33333333322222222...
  ..3333333333222222222..
  ..3333333333222222222..
  ..3333333333222222222..
  ..3333333333222222222..
  ..4444444444...........
  ..4444444444...........
  ..4444444444...........
  ..4444444444...........
  ..4444444444...........
  ...444444444...........
  ....44444444...........
  ....44444444...........
  ......444444...........
  .......44444...........
  .......................
  .......................
  LL corner: 501,501
  UR corner: 523,523
  
pie calling sequence #3: xcenter ycenter angle1 angle2 (n=[number])
  $ regdisp snr.fits "circle(512,512,10)&pie(512 512 0 270 n=3)"
  regions: circle(512,512,10)&pie(512 512 0 270 n=3)
  .......................
  .......................
  .......333332222.......
  ......33333322222......
  ....333333332222222....
  ....333333332222222....
  ...33333333322222222...
  ..3333333333222222222..
  ..3333333333222222222..
  ..3333333333222222222..
  ..3333333333222222222..
  ..4444444444...........
  ..4444444444...........
  ..4444444444...........
  ..4444444444...........
  ..4444444444...........
  ...444444444...........
  ....44444444...........
  ....44444444...........
  ......444444...........
  .......44444...........
  .......................
  .......................
  LL corner: 501,501
  UR corner: 523,523
  

polygon

polygon calling sequence #1: x1 y1 x2 y2 ... xn yn
  $ regdisp snr.fits "polygon(512.0, 512.0, 531.0, 512.0, 519, 524, 502.0, 524.0, 522, 518)"
  regions: polygon(512.0, 512.0, 531.0, 512.0, 519, 524, 502.0, 524.0, 522, 518)
  ................................
  ................................
  ..11111111111111111.............
  .....111111111111111............
  ........1111111111111...........
  ............1111111111..........
  ...............11111111.........
  ..................111111........
  .....................1111.......
  ....................111111......
  ..................111111111.....
  ................111111111111....
  ...............11111111111111...
  .............11111111111111111..
  ................................
  ................................
  LL corner: 501,511
  UR corner: 532,526
  

point

point calling sequence #1: x1 x1 x2 y2 ... xn yn
  $ regdisp snr.fits "point 512 512 514 514 516 516 518 518"
  regions: point 512 512 514 514 516 516 518 518
  ...........
  ...........
  ........4..
  ...........
  ......3....
  ...........
  ....2......
  ...........
  ..1........
  ...........
  ...........
  LL corner: 510,510
  UR corner: 520,520
  


Other pages of interest:
Last updated: August 7, 2015