Introduction: This Thing is Powerful
Atmospheric parameters and chemical abundances. ISpec is capable of determining atmospheric parameters (i.e effective temperature, surface gravity, metallicity, micro/macroturbulence, rotation) and individual chemical abundances for AFGKM stars by using two different approaches: synthetic spectra fitting technique or equivalent widths method. ISpec integrates MARCS and ATLAS model atmospheres. Read reviews, compare customer ratings, see screenshots, and learn more about iSpecSheets. Download iSpecSheets and enjoy it on your iPhone, iPad, and iPod touch.
My goal today is to start a series which shows you how to do many amazing things with Python scripts in iSpec, a tool put together by Dr. Blanco-Cuaresma. iSpec's main site describes it as 'a tool for the treatment and analysis of stellar spectra.' It does this exceedingly well as it is able to completely automate very tedious tasks and generally does them better than a person can (at least for general ballpark). What makes this program so powerful is its ability to do everything needed for parameter determination and abundance analysis in one place, instead of calculating a model atmosphere and then running that through radial transfer code. In particular, the abundance analysis calculations are extremely useful. As a human, it can take several hours to measure the lines for the elements you are interested in and one must be very careful to be consistent in how they do their equivalent width measurements, otherwise the error bar can be extraordinary. iSpec is able to measure the strongest lines of the abundance in question and do this completely consistently. With this tool one can reproduce both parameters and abundances in literature in a very short time with just a couple of scripts (we will do this in the following lessons). This program is also capable of changing a spectrum's resolution, removing cosmic rays, identifying telluric lines, etc. We will also cover many of these features related to spectra manipulation and correction.
Why Not Use The GUI?
This guide focuses specifically on Python script usage to run iSpec. The reason I will not be using the graphical user interface is because it does not have all the features that the scripts offer. However, I recommend that new users use the GUI to check specific things in the spectrum which may affect calculation before proceeding to run an observed spectrum through the scripts ( I will cover this step when relevant). Also, as the manual for the program notes, using scripts makes the results completely reproducible. So long as someone has the same data and runs it through the same script (which can be checked for accuracy) as the astronomer before them they should be able to get consistent results. Since this blog focuses on real research application, this is of utmost importance.
Installation and Configuration
Information on how to install iSpec is given in its manual here. All you need to do to get started is to install VirtualBox, add the extension pack , and then download the virtual machine found on the program's website. This will give you a program that is completely ready to run. I recommend playing with the GUI a bit at this point to get a taste for the kind of power we are dealing with.
If you are in the United States you will notice that the current keyboard layout is not what you are used to. To change this simply click the dash button and search 'keyboard.'
Now I recommend deleting all the Keyboard layouts that you do not want and then only keeping the 'English (US)' one. This should make all keyboard inputs consistent with what you'd expect.
Now to be able to use sudo commands (which we will need for installing Jupyter Notebook or any other program) we need to know the password for the administrator account. With how the virtual machine comes I was not able to figure out what the current one was. But we can get around this by resetting the password which is what I will show you how to do now. To do this you need to reset the virtual machine. You can do this by clicking Machine -> Reset. Now continuously press the shift key until this screen appears (begin pressing it right after you reset the machine):
Now go down to 'Advanced options for Ubuntu' and press Enter. This will then take you to this screen:
We now want to go to 'Ubuntu, with Linux 4.4.0-57-generic (recovery mode)'
You will be met with this screen:
From here go to 'root' and press enter. Now in the root shell prompt we want to type: 'mount -rw -o remount /'. Most likely even if you changed the keyboard layout before this step the '-' and '/' will be not in the places you'd expect. On a U.S. keyboard the '-' is the '/' and to get the '/' you need to do 'SHIFT+7'. Press enter and then type 'passwd virtual'. This shows that we want to make a new password for the account called 'virtual' which by default is the account with administrator privileges. Then simply type in your new password and restart!
Jupyter Notebook Installation
Now that we have changed the password and corrected the keyboard layout, I will be now showing how to install the Jupyter Notebook which I will be using for my guides. Note that this step is completely optional and one may use whatever they wish to create the scripts in. More information on the Jupyter Notebook and perhaps some motivation for its usage can be found here. I also recommend watching this Youtube video to see it in action.
The installation for the Jupyter Notebook is simple. Simply go to the 'Terminal Emulator' and type in 'sudo apt-get -y install ipython ipython-notebook'. This will give you an installation of Ipython. Next type in 'sudo -H pip install jupyter'. You should now have the Jupyter Notebook installed! To try it out simply type 'jupyter notebook' in the terminal which will open the web browser with Jupyter Notebook:
That's all for today. Congrats on the installation! At this point I recommend checking out 'example.py' and giving it a run to make sure everything is running okay (note that completing this entire script will take some time). Note this might make you feel like a hacker in a cheesy 90s movie.
Introduction
This document provides a sample configuration for how to allow VPN users access to the Internet while connected via an IPsec LAN-to-LAN (L2L) tunnel to another router. This configuration is achieved when you enable split tunneling. Split tunneling allows the VPN users to access corporate resources via the IPsec tunnel while still permitting access to the Internet.
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
The information in this document is based on a Cisco 3640 Router with Cisco IOS® Software Release 12.4.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Conventions
Refer to the Cisco Technical Tips Conventions for more information on document conventions.
Configure
In this section, you are presented with the information to configure the features described in this document.
Network Diagram
This document uses this network setup:
Note: The IP addressing schemes used in this configuration are not legally routable on the Internet. They are RFC 1918 addresses which have been used in a lab environment.
Configurations
This document uses these configurations:
Router A |
---|
Router B |
---|
Verify
Koala kbar mini. This section provides information you can use to confirm your configuration is working properly.
The Cisco CLI Analyzer (registered customers only) supports certain show commands. Use the Cisco CLI Analyzer to view an analysis of show command output.
show crypto ipsec sa - Shows the settings used by current Security Associations (SAs).
show crypto isakmp sa - Shows all current IKE SAs at a peer.
Troubleshoot
This section provides information you can use to troubleshoot your configuration. Sample debug output is also shown.
Troubleshooting Commands
The information in this document is based on a Cisco 3640 Router with Cisco IOS® Software Release 12.4.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Conventions
Refer to the Cisco Technical Tips Conventions for more information on document conventions.
Configure
In this section, you are presented with the information to configure the features described in this document.
Network Diagram
This document uses this network setup:
Note: The IP addressing schemes used in this configuration are not legally routable on the Internet. They are RFC 1918 addresses which have been used in a lab environment.
Configurations
This document uses these configurations:
Router A |
---|
Router B |
---|
Verify
Koala kbar mini. This section provides information you can use to confirm your configuration is working properly.
The Cisco CLI Analyzer (registered customers only) supports certain show commands. Use the Cisco CLI Analyzer to view an analysis of show command output.
show crypto ipsec sa - Shows the settings used by current Security Associations (SAs).
show crypto isakmp sa - Shows all current IKE SAs at a peer.
Troubleshoot
This section provides information you can use to troubleshoot your configuration. Sample debug output is also shown.
Troubleshooting Commands
The Cisco CLI Analyzer (registered customers only) supports certain show commands. Use the Cisco CLI Analyzer to view an analysis of show command output.
Note: Refer to Important Information on Debug Commands before you use debug commands.
debug crypto isakmp - Displays the ISAKMP negotiations of Phase 1.
debug crypto ipsec - Displays the IPsec negotiations of Phase 2.