<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Calculate sunrise and sunset with PyEphem</title>
	<atom:link href="http://scienceoss.com/calculate-sunrise-and-sunset-with-pyephem/feed/" rel="self" type="application/rss+xml" />
	<link>http://scienceoss.com/calculate-sunrise-and-sunset-with-pyephem/</link>
	<description>useful tidbits for using open source software in science</description>
	<lastBuildDate>Fri, 11 May 2012 06:21:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: C. Poynter</title>
		<link>http://scienceoss.com/calculate-sunrise-and-sunset-with-pyephem/comment-page-1/#comment-351</link>
		<dc:creator>C. Poynter</dc:creator>
		<pubDate>Tue, 14 Jul 2009 23:44:04 +0000</pubDate>
		<guid isPermaLink="false">http://scienceoss.com/?p=121#comment-351</guid>
		<description>I am trying to run this in Python 2.5. I only get a result for the last day of the year (end_date). How do I get a full years result and have it written to a text file, plus add 10 hours for Australian timezone.</description>
		<content:encoded><![CDATA[<p>I am trying to run this in Python 2.5. I only get a result for the last day of the year (end_date). How do I get a full years result and have it written to a text file, plus add 10 hours for Australian timezone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ryan</title>
		<link>http://scienceoss.com/calculate-sunrise-and-sunset-with-pyephem/comment-page-1/#comment-47</link>
		<dc:creator>ryan</dc:creator>
		<pubDate>Sun, 27 Apr 2008 19:16:49 +0000</pubDate>
		<guid isPermaLink="false">http://scienceoss.com/?p=121#comment-47</guid>
		<description>Xaviar:
Good call.  After updating my PyEphem version to the most recent one, I got a warning that the rise_time and set_time attributes are now deprecated, and next_rising and next_setting should be used instead.  I&#039;ve updated the post to reflect that change, just like you&#039;ve shown.</description>
		<content:encoded><![CDATA[<p>Xaviar:<br />
Good call.  After updating my PyEphem version to the most recent one, I got a warning that the rise_time and set_time attributes are now deprecated, and next_rising and next_setting should be used instead.  I&#8217;ve updated the post to reflect that change, just like you&#8217;ve shown.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaviar</title>
		<link>http://scienceoss.com/calculate-sunrise-and-sunset-with-pyephem/comment-page-1/#comment-46</link>
		<dc:creator>Xaviar</dc:creator>
		<pubDate>Sun, 27 Apr 2008 18:45:35 +0000</pubDate>
		<guid isPermaLink="false">http://scienceoss.com/?p=121#comment-46</guid>
		<description>Thanks for posting this. I needed something similar to this exact information. You could have used the next feature to step through the dates though. for example:

import ephem
import datetime

obs = ephem.Observer()
obs.lat = &#039;38.8&#039;
obs.long=&#039;-75.2&#039;

start_date = datetime.datetime(2008,1,1)
end_date = datetime.datetime(2008, 12, 31)
length = (end_date - start_date).days
rise_times = []
set_times = []
count = 0  
while count &lt; length:
    rise_times.append(obs.next_rising(ephem.Sun()))
    set_times.append(obs.next_setting(ephem.Sun()))
    count += 1</description>
		<content:encoded><![CDATA[<p>Thanks for posting this. I needed something similar to this exact information. You could have used the next feature to step through the dates though. for example:</p>
<p>import ephem<br />
import datetime</p>
<p>obs = ephem.Observer()<br />
obs.lat = &#8217;38.8&#8242;<br />
obs.long=&#8217;-75.2&#8242;</p>
<p>start_date = datetime.datetime(2008,1,1)<br />
end_date = datetime.datetime(2008, 12, 31)<br />
length = (end_date &#8211; start_date).days<br />
rise_times = []<br />
set_times = []<br />
count = 0<br />
while count &lt; length:<br />
    rise_times.append(obs.next_rising(ephem.Sun()))<br />
    set_times.append(obs.next_setting(ephem.Sun()))<br />
    count += 1</p>
]]></content:encoded>
	</item>
</channel>
</rss>

