Labels

APPLE (1) astro (1) IDL (4) life (2) linux (5) LSD (2) Mac (2) teaching (1) volleyball (2) work (1)

Friday, December 10, 2010

volleyball diary

Dec-10-2010:

Setting: Set the separation of your hands the size of the ball

Thursday, December 2, 2010

Useful Linux Commands

1. tar - tape archive and gzip - gnu zip

Creating a tape archive:

tar -cf archive.tar myDirectory/

Note - using the "v" flag prints out extra messages, as verbose mode, though it's not related to extracting files.

Listing the contents of an archive:

tar -tf archive.tar

It is generally a good idea to preview the contents of tape archives before unpacking them. This can become a serious problem if you are currently root, and the archive just happens to jump out of the current directory, and write over some important system files.

Extracting all files from an archive:

tar -xf archive.tar

To extract just partial pieces from the archive, supply a file or directory name after the archive name. You can list as many as desired here, separated by spaces.

tar -xf archive.tar filename


This is a gnu utility that is used to compress/decompress a file. Generally, if there is a set of files to compress, they will be sent through tar first to create a single file.

Compress:

gzip archive.tar

Decompress:

gunzip archive.tar.gz

How to Print non-contiguous pages in Leopard's Preview

One of the handy new features in the OS X 10.5 version of Preview—I’m pretty sure this is 10.5-only, at least—is the ability to selectively print pages directly from Preview. While you can use the Print dialog in any program to print one or a range of pages, you can’t use it to print a non-contiguous selection of pages—say pages two, four and five, and nine. But using Preview, you can do just that.

Open your multi-page PDF in Preview, hold down the Command key, and click on each page you’d like to print. With more than one page selected, the File - Print menu item changes to read File - Print Selected Pages. Choose that, or just press Command-P, and you’ll print the selected pages.

This trick proves really useful when printing Web pages. When I want to print something from the Web, I always first print it to a PDF, to see how it’s going to look, because some Web sites don’t print well at all. But once you’re in Preview, there’s no access to the Print dialog; if you click the Print button, the print job starts. By using the Command-click trick, you can choose exactly which of the site’s pages you’d like to print, right from Preview.

But what if you want to print just one page from the Web site? You might think you could Command-click on that one page and select Print…but that won’t work. With just one page selected, Preview will revert to printing the entire document. If you had access to the Print dialog, this wouldn’t be a problem…but because you printed to a PDF, you don’t.

The solution? Hold down Command and click on every page except the one you want to print, then hit Command-Delete. This will delete the selected pages, leaving just the one page you want to print. Please note that if you’re doing this on a file you’ve saved, you do not want to save the changes you’ve made—if you do, the pages you deleted will be gone for good! (But really, in the case of a saved document, you should just use the Print dialog to specify the one page you want to print.)

So the next time you need to print a non-contiguous range of pages—or just one page from a Web site—in Preview, use the Command key to get the (print) job done.

Sources:http://www.macworld.com/article/137760/2008/12/printsomepages.html by Rob Griffiths

Tuesday, July 20, 2010

How To Config the Default Settings for VI editor

1. create a file named .exrc in your home directory
2. config your settings in this file
And you are good to go

Monday, July 19, 2010

Procedures and Functions

1. fitexy:
Syntax - fitexy, x, y, A, B, X_SIG=sigx, Y_SIG=sigy, [sigma_A_B, chi_sq, q, TOLERANCE = ]

Multiple Plots on a Page


Source from: http://www.physics.nyu.edu/grierlab/idl_html_help/plotting11.html

Plots can be ganged on the display or page in the horizontal and/or vertical directions using the system variable field !P.MULTI. IDL sets the plot window to produce the given number of plots on each page and moves the window to a new sector at the beginning of each plot. If the page is full, it is first erased. If more than two rows or columns of plots are produced, IDL decreases the character size by a factor of 2.

!P.MULTI controls the output of multiple plots. Set !P.MULTI equal to an integer vector in which:

  • The first element of the vector contains the number of empty sectors remaining on the page. The display is erased if this field is zero when a new plot is begun.
  • The second element of the vector contains the number of plots per page in the horizontal direction.
  • The third element contains the number of plots per page in the vertical direction.
  • The fourth element contains the number of plots stacked in the Z dimension.
  • The fifth element controls the order in which plots are drawn. Set the fifth element equal to zero to make plots from left to right (column major), and top to bottom. Set the fifth element equal to one to make plots from top to bottom, left to right (row major).

Omitting any of the five elements from the vector is the same as setting that element equal to zero.

For example, to set up IDL to stack two plots vertically on each page, use the following statement:

  !P.MULTI = [0, 1, 2]  

Note that the first element, !P.MULTI (0), is set to zero to cause the next plot to begin a new page. To make four plots per page with two columns and two rows, use the following statement:

  !P.MULTI = [0, 2, 2]  

To reset to the default of one plot per page, set the value of !P.MULTI to 0, as shown in the following statement:

  !P.MULTI = 0 

This figure shows four plots in a single window. For details, inspect the batch file plot09 in the examples/doc subdirectory of the IDL distribution. Note the following features of the plots in the figure:

  1. The plot in the upper left has grid-style tick marks. This is accomplished by setting the TICKLEN keyword equal to 1.0
  2. The plot in the upper right has outward-facing tick marks. This is accomplished by setting the TICKLEN keyword to a negative value.
  3. The plot in the lower left corner has different axes on left and right, top and bottom. This is accomplished by drawing the top and right axes separately, using the AXIS procedure.
  4. The plot in the lower right uses no default axes at all. The centered axes are drawn with calls to the AXIS procedure.

LSD journal

DateContentBeforeAfterComments
xx/xx/2008CREATED
07/19/2010stast.prowidth mod (2*dw)width mod fix(2*dw)dw has to be integer or half integer
07/20/2010stast.prowght.proif width mod fix(2*dw) ne 0 then begin
width = width/fix(2*dw)+1)*fix(2*dw)
endif
quot = fix(width/(2*dw))
width = quot*2.*dw
width and dw are better to be float type
11/08/2010lsd.procombined all the pieces into one
11/30/2010lsd.procontain no routine to exclude the lines in the gap of two ordersyes