Sherpa

Introduction

  • Installation
  • A quick guide to modeling and fitting in Sherpa
  • Sherpa and CIAO

User Documentation

  • What data is to be fit?
  • Creating model instances
  • Evaluating a model
  • Available Models
  • What statistic is to be used?
  • Optimisers: How to improve the current parameter values
  • Fitting the data
  • Visualization
  • Markov Chain Monte Carlo and Poisson data
  • Utility routines
    • Controlling the verbosity of Sherpa
    • Random Numbers
    • Reference/API
      • The sherpa module
      • The sherpa.utils.err module
      • The sherpa.utils.logging module
      • The sherpa.utils.parallel module
      • The sherpa.utils.random module
      • The sherpa.utils.guess module
      • The sherpa.utils module
      • The sherpa.utils.testing module
      • The sherpa.io module
      • The sherpa.astro module
      • The sherpa.astro.io module
      • The sherpa.astro.io.types module
        • KeyType
        • HeaderItem
        • Header
        • Column
        • Block
        • TableBlock
        • SpectrumBlock
        • SpecrespBlock
        • MatrixBlock
        • EboundsBlock
        • ImageBlock
        • BlockList
        • BlockType
        • Class Inheritance Diagram
      • The sherpa.astro.io.wcs module
      • The sherpa.astro.io.xstable module
      • The sherpa.astro.utils module
      • The sherpa.astro.utils.xspec module

Worked Examples

  • Simple Interpolation
  • Comparing Gaussian, Lorentzian, and Voigt 1D models
  • Simple user model

An interactive application

  • Using Sessions to manage models and data

Notebooks

  • Sherpa Quick Start
  • Notebook support in Sherpa
  • A sample of plots
  • Axis labelling
  • Viewing PHA responses
  • Asymmetric errors

Extra Functionality

  • Optimizing functions

Getting Help

  • Bug Reports
  • Contributing to Sherpa development
  • Indices and tables
Sherpa
  • Utility routines
  • The sherpa.astro.io.types module
  • Header
  • View page source

Header

class sherpa.astro.io.types.Header(values: list[HeaderItem])[source] [edit on github]

Bases: object

Represent multiple FITS header cards.

This does not support all FITS features.

Attributes Summary

values

The stored header items.

Methods Summary

add(item)

Add the item (not checking for duplicates).

delete(name)

Remove the first occurrence of the key, if it exists (case insensitive).

get(name)

Return the first occurrence of the key (case insensitive).

Attributes Documentation

values: list[HeaderItem]

The stored header items.

Methods Documentation

add(item: HeaderItem) → None[source] [edit on github]

Add the item (not checking for duplicates).

delete(name: str) → HeaderItem | None[source] [edit on github]

Remove the first occurrence of the key, if it exists (case insensitive).

get(name: str) → HeaderItem | None[source] [edit on github]

Return the first occurrence of the key (case insensitive).

Previous Next

© Copyright 2019–2025, Chandra X-ray Center, Smithsonian Astrophysical Observatory. Last updated on 22 Aug 2025.

Built with Sphinx using a theme provided by Read the Docs.