<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Copyright (c) 2017-2020 Serpent-Tools developer team, GTRC
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Data files are not included with the python package, but can be downloaded from the GitHub repository. For this tutorial, the files are placed in the directory identified with the SERPENT_TOOLS_DATA environment variable.
Step1:  Depletion Matrix
The serpentTools package supports reading depletion matrix files, generated when set depmtx 1 is added to the input file.
As of SERPENT 2.1.30, these files contain 
    1. The length of time for a depletion interval
    2. Vector of initial concentrations for all isotopes present in the depletion problem
    3. ZAI vector
    4. Depletion matrix
    5. Vector of final concentrations following one depletion event.
Files such as this are present for each burnable material tracked by SERPENT and at each time step in the problem.
This document will demonstrate the DepmtxReader, designed to store these arrays.
NOTE The depletion matrices can be very large for many problems, ~1000 x 1000 elements. For this end, the DepmtxReader can store the matrices in Compressed Sparse Column csc_matrix form or as full numpy arrays. The reader will use the sparse format if scipy is installed unless told not to directly.
Step2:  We have access to all the data present in the file directly on the reader.
Step3:  This input file did not include fission yield libraries for depletion in order to reduce the size of the depletion matrix from ~1000 x 1000 to 74 x 74. 
Number densities and quantities in the depletion matrix are stored as longfloat types, as they contain many signifiicant digits in the output files.
Step4:  One can easily check if the depletion matrix is sparse by using the sparse attribute on the reader
Step5:  A simple plot method can be used to plot initial concentrations, final concentrations, or both.
Step6:  Some options can be passed to improve the look and feel of the plot
<ASSISTANT_TASK:>
Python Code:
%matplotlib inline
import os
mtxFile = os.path.join(
    os.environ["SERPENT_TOOLS_DATA"],
    "depmtx_ref.m")
Explanation: Copyright (c) 2017-2020 Serpent-Tools developer team, GTRC
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Data files are not included with the python package, but can be downloaded from the GitHub repository. For this tutorial, the files are placed in the directory identified with the SERPENT_TOOLS_DATA environment variable.
End of explanation
import serpentTools
reader = serpentTools.read(mtxFile)
reader
Explanation: Depletion Matrix
The serpentTools package supports reading depletion matrix files, generated when set depmtx 1 is added to the input file.
As of SERPENT 2.1.30, these files contain 
    1. The length of time for a depletion interval
    2. Vector of initial concentrations for all isotopes present in the depletion problem
    3. ZAI vector
    4. Depletion matrix
    5. Vector of final concentrations following one depletion event.
Files such as this are present for each burnable material tracked by SERPENT and at each time step in the problem.
This document will demonstrate the DepmtxReader, designed to store these arrays.
NOTE The depletion matrices can be very large for many problems, ~1000 x 1000 elements. For this end, the DepmtxReader can store the matrices in Compressed Sparse Column csc_matrix form or as full numpy arrays. The reader will use the sparse format if scipy is installed unless told not to directly.
End of explanation
reader.n0
Explanation: We have access to all the data present in the file directly on the reader.
End of explanation
reader.zai
Explanation: This input file did not include fission yield libraries for depletion in order to reduce the size of the depletion matrix from ~1000 x 1000 to 74 x 74. 
Number densities and quantities in the depletion matrix are stored as longfloat types, as they contain many signifiicant digits in the output files.
End of explanation
reader.sparse
reader.depmtx
Explanation: One can easily check if the depletion matrix is sparse by using the sparse attribute on the reader
End of explanation
reader.plotDensity()
Explanation: A simple plot method can be used to plot initial concentrations, final concentrations, or both.
End of explanation
reader.plotDensity(
    what='n0',  # plot initial value
    markers='>',  # marker for scatter plot
    labels='$N_0$',  # labels for each entry plotted
    ylim=1E-30,  # set the lower y-axis limit
)
Explanation: Some options can be passed to improve the look and feel of the plot
End of explanation
<END_TASK>