<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 pyphot - Interface with SVO filter profile service
http
Step1:  Quick Start
Quick start example to access the library and it's content
Step2:  Suppose one has a calibrated spectrum and wants to compute the vega magnitude throug the HST WFC3 F110W passband,
<ASSISTANT_TASK:>
Python Code:
%matplotlib inline
import pylab as plt
import numpy as np
import sys
sys.path.append('../')
from pyphot import sandbox as pyphot
from pyphot.svo import get_pyphot_filter as get_filter_from_svo
Explanation: pyphot - Interface with SVO filter profile service
http://svo2.cab.inta-csic.es/theory/fps/
If your research benefits from the use of the SVO Filter Profile Service, include the following acknowledgement in your publication:
This research has made use of the SVO Filter Profile Service
(http://svo2.cab.inta-csic.es/theory/fps/) supported from the Spanish MINECO
through grant AYA2017-84089.
and please include the following references in your publication:
The SVO Filter Profile Service. Rodrigo, C., Solano, E., Bayo, A., 2012; https://ui.adsabs.harvard.edu/abs/2012ivoa.rept.1015R/abstract
The SVO Filter Profile Service. Rodrigo, C., Solano, E., 2020; https://ui.adsabs.harvard.edu/abs/2020sea..confE.182R/abstract
Some examples are provided in this notebook
Full documentation available at http://mfouesneau.github.io/docs/pyphot/
End of explanation
lst = ["2MASS/2MASS.J", "2MASS/2MASS.H", "2MASS/2MASS.Ks",
       "HST/ACS_WFC.F475W", "HST/ACS_WFC.F814W"]
filters = [get_filter_from_svo(k) for k in lst]
filters
# get the internal default library of passbands filters
filters[0].info(show_zeropoints=True)
Explanation: Quick Start
Quick start example to access the library and it's content
End of explanation
# convert to magnitudes
import numpy as np
# We'll use Vega spectrum as example
from pyphot import Vega
vega = Vega()
f = filters[-1]
# compute the integrated flux through the filter f
# note that it work on many spectra at once
fluxes = f.get_flux(vega.wavelength, vega.flux, axis=-1)
# Note that fluxes is now with units of erg/s/cm2/AA
# pyphot gives Vega in flam and can convert between flux density units. 
fluxes, vega.wavelength, vega.flux
# convert to vega magnitudes
mags = -2.5 * np.log10(fluxes.value) - f.Vega_zero_mag
print("Vega magnitude of Vega in {0:s} is : {1:f} mag".format(f.name, mags))
mags = -2.5 * np.log10(fluxes.value) - f.AB_zero_mag
print("AB magnitude of Vega in {0:s} is : {1:f} mag".format(f.name, mags))
mags = -2.5 * np.log10(fluxes.value) - f.ST_zero_mag
print("ST magnitude of Vega in {0:s} is : {1:f} mag".format(f.name, mags))
Explanation: Suppose one has a calibrated spectrum and wants to compute the vega magnitude throug the HST WFC3 F110W passband,
End of explanation
<END_TASK>