# Reftek130 files - Quick way to retrieve only archive stats?

**URL:** https://discourse.obspy.org/t/reftek130-files-quick-way-to-retrieve-only-archive-stats/1245
**Category:** Usage Questions
**Created:** [June 2, 2021, 6:38pm UTC](https://discourse.obspy.org/t/reftek130-files-quick-way-to-retrieve-only-archive-stats/1245 "2021-06-02T18:38:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jimt](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/j/c57346/32.png) [@jimt](https://discourse.obspy.org/u/jimt)
#### Post date: [June 2, 2021, 6:38pm UTC](https://discourse.obspy.org/t/reftek130-files-quick-way-to-retrieve-only-archive-stats/1245/1 "2021-06-02T18:38:23Z")

</div>

Currently I us the obspy **read** method to get the stats of the Reftek130 file, example:  
**data = read(archive\_file\_path,format=“REFTEK130”)**

```
		for i in range(0,len(data)):
			npts = data[i].stats.npts
			sr = data[i].stats.sampling_rate
			start_time = data[i].stats.starttime
			end_time = data[i].stats.endtime

```

This is understandably a slow method considering it is accessing the entire data block.  
Is there a faster way to retrieve only the file stats?  
Thank you

---

<div class="post-metadata">

### Author: ![trichter](https://discourse.obspy.org/user_avatar/discourse.obspy.org/trichter/32/226_2.png) [@trichter](https://discourse.obspy.org/u/trichter)
#### Post date: [June 3, 2021, 7:33am UTC](https://discourse.obspy.org/t/reftek130-files-quick-way-to-retrieve-only-archive-stats/1245/2 "2021-06-03T07:33:29Z")

</div>

Please have a look at the documentation of `read()`. The `headonly` option might work for you.

---

<div class="post-metadata">

### Author: ![jimt](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/j/c57346/32.png) [@jimt](https://discourse.obspy.org/u/jimt)
#### Post date: [June 3, 2021, 2:24pm UTC](https://discourse.obspy.org/t/reftek130-files-quick-way-to-retrieve-only-archive-stats/1245/3 "2021-06-03T14:24:14Z")

</div>

> [@trichter](#):
>
> `headonly`

Thank you, I’ll check it out
