Trim.pro

I just remembered you’ll need this beauty in order to run hfit.pro

I like to use IDL to make nicely formatted tables or listings of data to drop into, say, latex or other software. One of my pet peeves in IDL is that the numbers always give a large number of digits, and there are leading spaces. So, a while back I wrote trim.pro to take care of this. It’s very handy!

e.g. if x = 5.43961

print, trim(x,2) yields 5.44 (it rounds, rather than truncates)

you can find it here.

enjoy!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s