per page, with , order by , clip by
Results of 0 - 1 of about 0 (0.000 sec.)
Full script of annotations on figure (GNU Astronomy Utilities)
@digest: 275c5050577444f441cb7d2fd9c3609a
@id: 379508
@mdate: 2024-02-03T20:01:11Z
@size: 8258
@type: text/html
content-type: text/html; charset=utf-8
description: Full script of annotations on figure (GNU Astronomy Utilities)
distribution: global
generator: makeinfo
keywords: Full script of annotations on figure (GNU Astronomy Utilities)
resource-type: document
viewport: width=device-width, initial-scale=1
#keywords: newcommand (28553), bdir (26232), scalelineinkpc (20867), scalelinerastart (20867), numticks (15241), scalelinedec (14319), scalelineraend (14319), sblow (13911), sbhigh (13911), pixarea (10781), redshift (9473), annotations (9259), zeropoint (5920), brightness (5261), astfits (4720), f160w (2652), scaled (2593), crop (1965), figure (1941), printf (1827), coverage (1775), surface (1580), astronomy (1543), paper (1108), macros (1101), summarize (1089), awk (909), image (891), repeating (825), annoying (742), distance (674), fits (652)
GNU Astronomy Utilities Previous: Annotations for figure in paper , Up: Annotations for figure in paper [ Contents ][ Index ] 5.2.4.1 Full script of annotations on figure ΒΆ In Annotations for figure in paper , we each one of the steps to add annotations over an image were described in detail. So if you have understood the steps, but need to add annotations over an image, repeating those steps individually will be annoying. Therefore in this section, we will summarize all the steps in a single script that you can simply copy-paste into a text editor, configure, and run. Necessary files: To run this script, you will need an image to crop your object from (here assuming it is called ah_f160w.fits with a certain zero point) and two my-figure.tex and report.tex files that were fully included in Annotations for figure in paper . Also, we have brought the redshift as a parameter here. But if the center of your image always points to your main object, you can also include the Query command to automatically find the object's redshift from NED. Alternatively, your image may already be cropped, in this case, you can remove the cropping step and # Parameters. sblow=22 # Minimum surface brightness. sbhigh=30 # Maximum surface brightness. bdir=build # Build directory location on filesystem. numticks=7 # Number of major ticks in each axis. redshift=0.619 # Redshift of object of interest. zeropoint=25.94 # Zero point of input image. scalelineinkpc=20 # Length of scale-line (in kilo parsecs). input=ah_f160w.fits # Name of input (to crop). # Stop the script in case of a crash. set -e # Build directory if ! [ -d $bdir ]; then mkdir $bdir; fi # Crop out the desired region. crop=$bdir/crop.fits astcrop $input --center=53.1616278,-27.7802446 --mode=wcs \ --width=20/3600 --output=$crop # Warp the image to larger pixels to show surface brightness better. scaled=$bdir/scaled.fits astwarp $crop --centeroncorner --scale=1/3 --output=$scaled # Calculate the pixel area and convert image to Surface brightness. sb=$bdir/sb.fits pixarea=$(astfits $scaled --pixelareaarcsec2) astarithmetic $scaled $zeropoint $pixarea counts-to-sb \ --output=$sb # Convert the surface brightness image into PDF. sbpdf=$bdir/sb.pdf astconvertt $sb --colormap=gray --borderwidth=0 \ --fluxhigh=$sbhigh --fluxlow=$sblow --output=$sbpdf # Specify the coordinates of the scale line (specifying a certain # width in kpc). We will put it on the top-right side of the image (5% # of the full width of the image away from the edge). coverage=$(astfits $sb --skycoverage --quiet | awk 'NR==2') scalelinedec=$(echo $coverage | awk '{print $4-($4-$3)*0.05}') scalelinerastart=$(echo $coverage | awk '{print $1+($2-$1)*0.05}') scalelineraend=$(astcosmiccal --redshift=$redshift --arcsectandist \ | awk '{start='$scalelinerastart'; \ width='$scalelineinkpc'/$1/3600; \ print start+width}') # Write the LaTeX macros to use in plot. Start with the thick line # showing tangential distance. macros=$bdir/macros.tex printf '\\newcommand{\\maScaleDec}'"{$scalelinedec}\n" > $macros printf '\\newcommand{\\maScaleRAa}'"{$scalelinerastart}\n" >> $macros printf '\\newcommand{\\maScaleRAb}'"{$scalelineraend}\n" >> $macros printf '\\newcommand{\\maScaleKpc}'"{$scalelineinkpc}\n" >> $macros printf '\\newcommand{\\maCenterZ}'"{$redshift}\n" >> $macros # Add image extrema for the coordinates. v=$(echo $coverage | awk '{print $1}') printf '\\newcommand{\maCropRAMin}'"{$v}\n" >> $macros v=$(echo $coverage | awk '{print $2}') printf '\\newcommand{\maCropRAMax}'"{$v}\n" >> $macros v=$(echo $coverage | awk '{print $3}') printf '\\newcommand{\maCropDecMin}'"{$v}\n" >> $macros v=$(echo $coverage | awk '{print $4}') printf '\\newcommand{\maCropDecMax}'"{$v}\n" >> $macros # Distance between each tick value. v=$(echo $coverage | awk '{print ($2-$1)/'$numticks'}') printf '\\newcommand{\maTickDist}'"{$v}\n" >> $macros printf '\\newcommand{\maSBlow}'"{$sblow}\n" >> $macros printf '\\newcommand{\maSBhigh}'"{$sbhigh}\n" >> $macros # Copy the LaTeX source into the build directory and go there to run # it and have all the temporary LaTeX files there. cp report.tex my-figure.tex $bdir cd $bdir rm -f *-figure0* pdflatex -shell-escape -halt-on-error report.tex Previous: Annotations for figure in paper , Up: Annotations for figure in paper [ Contents ][ Index ] Read in other formats . GNU Astronomy Utilities 0.22 manual, February 2024. ...
http://www.gnu.org/savannah-checkouts/gnu/gnuastro/manual/html_node/Full-script-of-annotations-on-figure.html - [detail] - [similar]
PREV NEXT
Powered by Hyper Estraier 1.4.13, with 213361 documents and 1081398 words.