New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added function to load a Surfer ascii grid #33

Merged
merged 14 commits into from Jul 23, 2013

Conversation

Projects
None yet
2 participants
@hbueno
Member

hbueno commented Jul 17, 2013

I until need to write some conditional test.
A cookbook example will be easy and fast to write.
For now, I'd like to learn the best way to load a file using Python.

hbueno added some commits Jul 17, 2013

Added function to load a Surfer ascii grid
I until need to write some conditional test
@leouieda

This comment has been minimized.

Member

leouieda commented Jul 17, 2013

@hbueno Boa! Agora faça a receita do jeito que a gente tinha falado e coloque no cookbook

@leouieda

This comment has been minimized.

Member

leouieda commented Jul 17, 2013

@hbueno Use the data in this Gist to test the script: https://gist.github.com/leouieda/6023922

You can use urllib to download the data automatically so that we don't have to include it in the source:

import urllib
url = 'https://gist.github.com/leouieda/6023922/raw/948b0acbadb18e6ad49efe2092d9d9518b247780/bouguer_alps_egm08.grd'
urllib.urlretrieve(url, 'bouguer_alps_egm08.grd')
y, x, bouguer, shape = io.load_surfer('bouguer_alps_egm08.grd', fmt='ascii')
@leouieda

This comment has been minimized.

Member

leouieda commented Jul 17, 2013

@hbueno Bonus points if you make another function in fatiando.io called fetch_bouguer_alps_egm() that uses urllib to download the data (as shown in the comment above)

hbueno added some commits Jul 17, 2013

Added io_surfer.py into cookbook
I'll change the url part when `fetch_bouguer_alps_egm()` will done
@leouieda

This comment has been minimized.

Member

leouieda commented Jul 18, 2013

@hbueno testei aqui e tá funcionando!

@leouieda

This comment has been minimized.

Member

leouieda commented Jul 18, 2013

@hbueno Nas docstrings, tire as linhas vazias entre as descrições de parâmetros e returns.

@leouieda

This comment has been minimized.

Member

leouieda commented Jul 18, 2013

Agora coloque uma breve descrição das suas funções na docstring do módulo (topo do arquivo). Inspire-se nas que já estão la

@leouieda

This comment has been minimized.

Member

leouieda commented Jul 18, 2013

Henricão, só mais essas coisas pequenas e já tá pronto! Parabéns cara

hbueno added some commits Jul 18, 2013

@hbueno

This comment has been minimized.

Member

hbueno commented Jul 19, 2013

@leouieda acho que não esqueci de nada. Por favor, veja a descrição da docstring.
A referencia deve ficar logo abaixo da função que a menciona ou no final de tudo?
Espaços, indentação está ok?

@leouieda

This comment has been minimized.

Member

leouieda commented Jul 19, 2013

@hbueno Só mais umas coisas triviais. Ficou excelente! (i.e., malandruxo!)

leouieda added a commit that referenced this pull request Jul 23, 2013

Merge pull request #33 from hbueno/grid
Added function to load a Surfer ascii grid

@leouieda leouieda merged commit 1b67c5f into fatiando:master Jul 23, 2013

1 check passed

default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment