caterpillar fungus production climate change habitat winter species LEK {border-style Fig. Tibetan areas collection Himalayan data px;} #ffffff;} Appendix, distribution trends Ophiocordyceps environmental factors harvesting knowledge models temperature warming likely permafrost studies Plateau Conserv changes collectors conditions ecological higher Biol Nepal decreasing local multiple precipitation predicted reported responses used effects high overexploitation temperatures Ecol Sci evidence mean population proportion region shift variables However, px; significant sinensis suitable valuable {font-family Bhutan, Supplementary climatic declines elevation elevations font-size growing nearly niche range regressions sinensis) traditional understanding > Change Climate Methods Shrestha affected coldest double; fungus, global harvest interviewees literature locations populations recent regions response sustainability use Bawa Bhutan Chinese Environ Nepal, University Western administrative affecting amounts approach associated based biological border-color border-width cause causes causing commodities degradation different ecosystem ecosystems especially fungal impacts increase interannual level levels little logistic medicinal model modeling number potential range. reduce review soil solid; species, timing upward {font-style {font-weight Caterpillar China Cordyceps Glob Himalaya Nature Proc Stanford Table Tibet Yartsa additional alpine area available base biodiversity bold cold collected competition contributing courier; declining decreased decreases demand determine em; extinction important include increased interviews large livelihoods loss models. observed playing points potentially pressure pt;} quantitative quarter range, resource role scales science scientific significantly systems vegetation weather °C,


Informatics 2016/17
Books
Computation & Logic (course page, piazza, tutorials)
Functional Programming (course page, piazza, tutorials)
- Function List
- Learn You A Haskell (official online book)
- Assigned groups: Labs, Tutorials
- Emacs: Haskell has died
-
import Test.QuickCheck
doesn't work!
Open up the command line / Terminal, and typecabal install quickcheck
-
"I'm doing
cabal install quickcheck
, but it doesn't work because of something related to satisfying packages... random-1-1...?"
Solution: Trysudo ghc-pkg recache
. Then trycabal install quickcheck
again.
Exams
-
Exam Dates
Exam Location Date ILA See "View" Thur, 08th Dec, 09:30-12:30 (3hrs) INF1-CL Pleasance Sports Hall Thur, 15th Dec, 14:30-16:30 (2hrs) INF1-FP Group A FH Computer Lab Tues, 20th Dec, 09:30-11:30 (2hrs) INF1-FP Group B FH Computer Lab Tues, 20th Dec, 14:30-16:30 (2hrs) Intro to Cog Sci Outreach Centre Wed, 21st Dec, 09:30-11:30 (2hrs) - Tip by a tutor for the final exam: the exam is open book, so taking in a copy of the previous year's exam paper and solutions may be beneficial
Other
- View the Quizlet class (you can join directly here, use the same password for the books)
- EveryonePrint
- Common Outside Course Options for Informatics Students (2016/17)
- Laundry Tracker
- Edit this page on GitHub!
- Reset your DICE password
- Access DICE files online


Dear {{ user.username }},
Congratulations, you have been granted access to {{ base_object.title }} on {{ site.domain }}.
Regards, {{ site.name }}
This is an automated service email from {{ site.domain }}.


What is a salmon cookie, you may ask. Well, that's not as easy to define as one might think. You see, Pat's Salmon Cookies is a family business local to the city of Seattle and we use only the finest organic cage free salmon in our cookies. We make sure that all of the salmon we use have been treated humanely before we grind them into a fine powder and use them in our cookies. Please note that that with Pat's Salmon Cookies you are getting all of the sweetness you expect with a cookie along with the healthy protiens and fats you would get with cooked salmon. So yes, Pat's Salmon Cookies are indeed cookies made of salmon, at the end of the day we like to think of our cookies expressions of love to you and yours. So why don't you drive over to one of our many locations and grab a few?
| 1st and Pike | 6am - 8pm | Monday - Sunday |<PHONE_NUMBER> |
|---|---|---|---|
| Seatac Airport | 6am - 8pm | Monday - Sunday |<PHONE_NUMBER> |
| Seattle Center | 6am - 8pm | Monday - Sunday |<PHONE_NUMBER> |
| Capitol Hill | 6am - 8pm | Monday - Saturday |<PHONE_NUMBER> |
| Alki | 6am - 8pm | Monday - Friday |<PHONE_NUMBER> |


| Quote | Author | |
|---|---|---|
| 'I'm not going to school just for the academics - I wanted to share ideas, to be around people who are passionate about learning.' | Emma Watson | |
| 'Remember there's no such thing as a small act of kindness. Every act creates a ripple with no logical end.' | Scott Adams | |
| 'Intelligence plus character-that is the goal of true education.' | Martin Luther King, Jr. | |


FAQs
Budibase is the fast and effective way to build cutom directories. Here’s everything you need to know about our innovative low-code platform.
{{ partial "header.html" . }} {{ partial "navigation.html" . }}
Use Budibase to create powerful, secure directory apps, with clean UIs, advanced functionality, and complete customization.
Build deployable directories, with custom design and functionality.
Budibase tools work perfectly on all kinds of devices.
Deploy to your own infrastructure or choose Budibase Cloud.
Create public or private directories, with custom permission tiers.
Directory apps are used to store, manage, and share information and contact details for different individuals and companies. Businesses use directories to provide accessible, up-to-date records of their employees, suppliers, customers, and other stakeholders. Most directories are stand-alone tools, for users to look up, add, or update information. Others integrate with external tools, to provide a streamlined, efficient way to gather, manage, and access existing data. Use Budibase to build tools for fast, information access, saving time and money.
Businesses waste huge amounts of time and money sharing basic information among colleagues, customers, and partners. Quick calls, emails, and time spent searching through spreadsheets quickly add up to massive hidden costs. Directories put the information users need, right at their fingertips. Empower your team to quickly locate crucial data, without wasting coworkers’ time. Building a dedicated directory tool ensures that your data is consistent, accurate, and up-to-date. Give your team an intuitive interface to update and collect information, without the need for specialist database skills.
Create custom directory apps in under five minutes, without compromising on functionality. Say goodbye to repetitive, expensive app development.
Create intuitive, performant, single page apps, in minutes.
Use custom RBAC to control how different users interact with your apps.
Display, hide or update any component with custom conditionality rules.
Our platform offers powerful yet simple design tools.
Budibase app components are thoroughly tested for key accessibility standards.
Budibase tools work seamlessly on desktop, mobile, or tablet devices.
Eliminate manual admin tasks with custom automation rules.
Use single sign-on across all of your Budibase tools.
Create simple search forms or use dynamic filters to find specific information in seconds.
Connect to external apps, using Zapier, Webhooks, and more.
Choose the perfect hosting and deployment options for your specific needs. With self-hosting and cloud deployments, Budibase is the smart choice for building all kinds of web applications and internal tools.
{{ partial "deploy-options.html" . }}Check out our range of ready-made directories. Choose one of our free templates as a deployable app, or as a starting point for your own custom solution.
{{ .Summary }}
Get this template
We’re changing the equation when it comes to sourcing custom tools. Gone are the days of time-consuming, costly custom builds. With Budibase, you can build and deploy directory apps, in as little as five minutes.
Don’t settle for subpar solutions.
Tailor your directories to your exact information management requirements. Control which users can access and edit entries, for maximum security and usability.
Create closed platforms to share information between partners, stakeholders, and more. Allow users to access key information about other members, or update and maintain their own entries.
Store, manage, and present publicly accessible information, with an intuitive, functional directory. Share limited information with public users, while restricting sensitive data and editing permissions to your internal users.
Build internal directories to manage and share information within large organizations. Give your employees an intuitive tool to find, contact, and collaborate with colleagues, wherever they are.
Budibase is the fast and effective way to build cutom directories. Here’s everything you need to know about our innovative low-code platform.


User Login
User ID:
Password:
Login
User Registration
Your Full Name:
Your Email Address:
Upload Profile Picture:
Register


We are civic-minded residents committed to working with local government and the Buffalo community to make our region stronger. We’re here to help and eager to learn from professional public servants. While we’re advocates for open government (we can’t build apps without open data!), we’re non-partisan and public-minded.
We are a group of organizers and activists, software developers and data scientists, designers and researchers, project managers and public servants, and many more passionate community members. We work in partnership with government, non-profit, and technical partners to deploy technology to improve quality of life for all residents and increase citizen engagement with civic issues.
Ultimately, our goal is to make life better for residents by improving personal and collective outcomes. We strive to achieve this by helping enhance public services to be better, faster, and cheaper and have the greatest impact for the greatest amount of people who have the greatest need.
We welcome people of any gender identity or expression, race, skin color, ethnicity, age, size, nationality, sexual orientation, ability level, neurotype, religion, elder status, family structure, culture, subculture, political opinion, education level, identity, and self-identification. We welcome activists, artists, bloggers, crafters, coders, wannabe-coders, designers, entrepreneurs, documentation writers, journalists, sysadmins, teachers, ordinary people, extraordinary people, and everyone in between.
Code for Buffalo is led by a Core Team that organizes events, manages strategic partnerships, and ensures fluid communication among cross-functional project teams. The Core Team oversees volunteer management, organizational sustainability, and day-to-day operations.


Home
Work
About Us
Contact
Trendcue
Responsive Fashion Hub Website
OppermanWeiss
Responsive Agency Website
Athenos
Responsive Brand Website
Coach
Coach App
Droga5
Responsive Agency Website
WiredScore
Responsive Brand Website
Puma 100 Metre Shoppe
Responsive Tumblr Shopping Experience
Ethr
Social Music App / Coming Soon
ThunderClap
Responsive Social Platform
Unicef Tap Project
Social Donation Application
UglyDolls
Fully Animated Website
Target
Website & Advertising
Prodigy Network
Responsive Brand Website
Coke Zero
Website & Advertising
Lowe's
Mobile Website
Coca Cola
Brand Micro Website
Audi
Brand Micro Website
Coach
Brand Micro Website
Peacful Countries
D&AD White Pencil Submission
Imagine That
Responsive Brand Website
Spotify
Brand Micro Website


{% extends 'layout-analysis.html' %} {% load staticfiles %} {% load jsonify %} {% block title %}Analysis #{{analysis.id}} Reference Stars{% endblock %} {% block heading %}Reference Stars{% endblock %} {% block styles %} {% endblock %} {% block content-interior %} {% with active_crumb='reference_stars' %} {% include 'imageflow_breadcrumbs.html' %} {% endwith %}
The point sources discovered in your image are processed for their astrometry, which assigns precise celestial coordinates to your image. This allows us to determine the right ascension and declination of each star in the image. Using this information, we can determine the official designation of known stars (using the URAT1 catalog). You can begin selecting comparison stars from these designations.
{{analysis.data.catalog_reference_stars | length}} catalog stars were recognized out of {{analysis.data.coords | length}} point sources total. {{ analysis.data.comparison_star_ids|length }} are selected as comparison stars.
| ID | Designation | Field X | Field Y | RA (J2000) | Dec (J2000) | Instrumental mag | Mag uncertainty (±) | |
|---|---|---|---|---|---|---|---|---|
| {{star.id}} | {{star.designation}} | {{star.field_x|first|floatformat:2}} | {{star.field_y|first|floatformat:2}} | {{star.index_ra|floatformat:5}} | {{star.index_dec|floatformat:5}} | {{star.mag_instrumental|floatformat:3}} | {{star.mag_instrumental_unc|floatformat:3}} |
Use this photometric data from the APASS and 2MASS surveys to select comparison stars from the set of reference stars. Good comparison stars are usually the same color (temperature) as your target. Use this reference to choose appropriate stars:
{% include 'partials/stellar_classification_table.html' %}Try also to choose stars with low magnitude uncertainty. For comparison of photometric systems see this reference. You have selected 0 objects as comparison stars.
| ID | Designation | Instrumental mag | Mag uncertainty (±) | Temperature (K) | B (Johnson) | V (Johnson) | g' (Sloan) | r' (Sloan) | i' (Sloan) | J (2MASS) | H (2MASS) | K (2MASS) | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{star.id}} | {{star.designation}} | {{star.mag_instrumental|floatformat:3}} | {{star.mag_instrumental_unc|floatformat:3}} | {{star.temperature|floatformat:1}} | {{star.Bmag}} | {{star.Vmag}} | {{star.gmag}} | {{star.rmag}} | {{star.imag}} | {{star.Jmag}} | {{star.Hmag}} | {{star.Kmag}} |
Below is a plot of your original image (resized to fit your screen) annotated with detected point sources, reference stars, and comparison stars. {% include 'partials/point_source_plot.html' with disable_target_selection=1 %}
A graph of instrumental magnitude vs standard catalog magnitudes helps show that you have selected representative comparison stars, and that the computed instrumental magnitudes are generally sane.
Red indicates comparison stars, blue indicates other catalog stars.
{{analysis.data.unknown_stars | length}} point sources that were not matched to reference stars.
| ID | Field X | Field Y | RA (J2000) | Dec (J2000) | Instrumental mag | Mag uncertainty (±) |
|---|---|---|---|---|---|---|
| {{star.id}} | {{star.field_x|floatformat:2}} | {{star.field_y|floatformat:2}} | {{star.index_ra|floatformat:5}} | {{star.index_dec|floatformat:5}} | {{star.mag_instrumental|floatformat:3}} | {{star.mag_instrumental_unc|floatformat:3}} |


Presentation on Quiz Web App
Sagar Sapkota
/sgrspkt
Introduction
- Web application developed in PHP 5.5, mySql 5.6 & Apache 2.5
Objectives
- To help an individual to enrich knowledge in various fields.
- Allows individual to register, login and play a quiz game.
Overview of Quiz
- There are various areas of interest where an individual can select one of them at one time and play a game.
- Each interest field is provided with 10 multiple choice questions, when a individual chooses correct answer the score will be summed where full score will be 10.
- An individual is provided 100 seconds to solve all 10 questions.
- If he/she can’t solve within 100 seconds the game is terminated and cannot choose ‘next’ to play.
Used technologies
- JavaScript & jQuery
- For client side validations javascript and jQuery are used.
- A separate js file is created to contains js,jQuery and ajax calls. This also maintains maintainability of code.
- Ajax
- The jQuery’s $.ajax() function is extensively used to perform an asynchronous HTTP request with server in client side.
ER diagram
Schema Diagram
Folder Structure
Registration Page
- Before participating a quiz, a user have to first register and login. To register one can directly click on the register menu to create an account.
Login Page
- When a quiz app loads, the user is directly redirected to the login page, if the user is not logged in.
Login Screen
User Home Page
- Home page is the landing page of the application from where a user can participate any quiz categories by clicking by choosing .
- On the home page, if the user is loggedin his name and profile is also shown and a logout link is provided to logout from the application.
Login Screen
Quiz Screens
-
On starting a quiz, a user is presented with the first question of the quiz with the next button.
- Note that the previous button is not shown when the user is on first question and next button is not shown when the user is in the last question.
Quiz Screen pictorial
Quiz Screens Cont..
- User can go back and forth to solve questions.
- If user is not interested to play a quiz at middle of game, he/she can easily quit the game by clicking cross button onto the top right corner
- To solve all 10 questions user is given a time period of 100 seconds
- Remaining questions to be solved are also displayed with the current question number
Quiz Screen Pictorial
User Profile
- After a quiz game is completed, User is redirected to their profile
- Profile contains user's data with the total score he/she secured
Profile Screen Pictorial
Login Page
- admin can access the dashboard only after logging in to their account.
Login Screen
Dashboard Page
- Dashboard page is the homepage for admin where admin have full access to:
- Questions [CRUD]
- Category [CRUD]
- User Registrations
- Scores
Dashboard Screen
Categories
- Admin can CRUD categories
Category Screen
Category Screen cont.
Questions & Answers
- Admin can CRUD Questions & Answers
Questions & Answers Screen
Questions & Answers Screen cont.
Users Registered
- Admin can View Users that are registered
Users View
Score
- Admin can View Scores of users
Score View
THANK YOU , IT'S DEMO TIME !!
Happy Coding :)


Creating Empty Git Commits
Nov 29, 2016You may not know it, but Git allows you to create an empty commit in to your repo. It doesn’t like it, but you can do it any way.
An empty commit is one where you don’t actually commit any code changes i.e. if you git status your repo, you get the message:
On branch master
nothing to commit, working tree clean
Why would you want to create an empty commit? You may want to communicate changes, which have nothing to do with code. But you have updated something that you want the rest of the team to know about. And you feel that communicating this via the git log make sense.

Fin.


Armeena Khan, OKB, Meesha Shafi react to Khalilur Rehman's remarks
by Entertainment DeskKhalilur Rehman Qamar’s recent comments regarding women and infidelity have caused quite a stir in the showbiz industry and the audience.
In a recent interview, the writer went on to defend his ideas and ‘Philosophy’ around how he sees society.
“Get someone to try me under #MeToo, I won’t care about that either. But I won’t be able to call every woman a woman. That simply isn’t true for me.”
Qamar continued that when he saw the infidelity within women and the state of men, he went on, “A man leaves all his honour, his self-esteem with his wife when he goes out to earn a living. And I curse those women who violate that trust. That was the concept behind Mere Pass Tum Ho and so I’m fighting for the ‘good women’. It would be unfair to these [good] women to be classified along with those who aren’t loyal.”
The Kaaf Kangana director further elaborated that he is a feminist to the core, but he is slightly selective about his politics.
“Trust me, you’ll not find a bigger feminist in Pakistan, but I fight for good women only. Loyalty is a woman’s virtue; don’t challenge it.”
Many came forward, baffled at the writer’s stance. Osman Khalid Butt, Ali Gul Pir, Armeena Khan, Meesha Shafi, Jami were few celebrities who commented on Qamar’s remarks.
“And this guy is the most sought-after writer in our TV industry. If he is the one writing the dramas then you can expect the kind of s**t you see on TV,” Pir wrote.

“This is beyond problematic,” shared Khan.
Questioning the silence of actors over Qamar’s remarks, Shafi shared, “Ummmm and how many actors, actresses, pro/dir and channels will put their foot down in response to these views and send a message of resistance here?”


Maya Kane
Democrat
Attorney, Southwest Water and Property Law LLC
B.A., Oberlin College (2001); M.S., Yale University (2007), J.D., University of Oregon School of Law (2011)
81301
I have volunteered for the La Plata County Democrats, including as a poll watcher during the 2020 General Election, and donated to several political campaigns, including Hillary Clinton, Joe Biden, Pete Buttigieg, Mark Kelly, Amy McGrath, and Diane Mitsch Bush.
Board Member, San Juan Citizens Alliance (present); Member, Native American Voting Rights Coalition (past); Board of Directors, Durango Early Learning Center (past).
As an attorney, I regularly advise, advocate, and litigate on behalf of my clients throughout Colorado. Those clients include nonprofit organizations with diverse needs and interests. I also serve on the board of a nonprofit organization and regularly organize events to support its work, and advocate on behalf of the organization and its objectives.
I want to serve on the Commission because I am passionate about ensuring the fundamental right to vote. I have dedicated the majority of my professional legal career to protecting this right, particularly for underrepresented and disenfranchised rural, minority communities. For example, I spent six years representing Native American plaintiffs in complex redistricting litigation under the Equal Protection Clause of the United States Constitution and Section 2 of the Voting Rights Act. That case led to a Tenth Circuit opinion upholding District Court decisions on unconstitutional and intentional racial discrimination in redistricting plans, as well as Court-ordered remedial districting plans. One of the more gratifying experiences of my career was witnessing how victory in the court room translated to meaningful change in local elections and representation. As a Commissioner, I intend to leverage my skills and understanding of the law to serve the state of Colorado in ensuring that election districts are drawn in compliance with federal and constitutional mandates and fairly represent all residents of our state.
I thrive on interacting with diverse groups and collaborating as a member of a team. Litigating voting rights issues in rural communities taught me how challenging it can be to bring stakeholders with diverse opinions together to advocate for a common cause. Yet, none of our courtroom “wins” would have been meaningful without the support of the communities we represented. I look forward to contributing my skills as a facilitator and mediator to the Commission. Maintaining impartiality as a Commissioner is critical to ensuring the legitimacy of the redistricting process and to formulating fair election districts that preserve an equal right to vote for all Coloradoans. While I regularly serve as an advocate, I am equally comfortable in impartial roles, including working as a volunteer mediator in state court. I pledge to be fair and impartial in all of my work as a Commissioner.
With a background in both science and law, I will bring a unique, multidisciplinary skill set to the Redistricting Commission. As a scientist, I am well-versed in quantitative methodologies, including Geographic Information Systems and spatial analyses. I routinely draw on skills I developed as a graduate student, including the ability to synthesize complex concepts and organize and summarize vast sets of data in legal briefing. As an attorney, I am used to employing logic and reason to advocate successfully on behalf of my clients and their interests.
Female


Z-6™ Ultra Clean is the first detailing spray designed to be a quick detailer and a polish enhancement in one.
Z-7™ Show Car Wash is a concentrated blend of special cleaners, conditioners and our famous Show Car Polish ingredients that clean and enhance the gloss of painted surfaces.
Use of Z-8 Grand Finale Spray Seal may cause you to attract more attention than you ever did before.


| DOSE: T+ 0:00 |
20 mg |
oral |
2C-B |
(powder / crystals) |
| T+ 2:30 |
5.0 mg |
oral |
2C-B |
(powder / crystals) |
| |
repeated |
oral |
GHB |
(liquid) |
| |
5 hits |
smoked |
Cannabis |
(plant material) |
| |
|
smoked |
Tobacco |
|
Flashback: I marry the most beautiful woman in the world...open-hearted, generous, and sexy...
Last Night: A friend has kindly traded us - we've recieved 9 clear capsules with a tiny bit of white powder in each (2cb). Take four, he says he's been told. After research, I'm assuming these are 5mg's, satisfying the fiending part of my ego that I've enough for a solid first trip with 'the bees'. In addition, I read G and herb mix well..both are allies and will be used.
After some 'discussion' as to whether to ingest that evening (there has been some recent illness, fatigue, and stress) we subtly agree that we create our experience and to stop fearing.
5:00pm Open four capsules under my tounge, three under my partner's (following a light lunch 6 hours prior). Bitter, but not bad, likely due to the tiny amounts involved. We swallow the mostly empty caps. Cheers. A cap of GHB (which has been exactly enough for a plesant buzz on an empty stomach from this batch). We're off for a walk to the grocery for crytallized ginger - something about possible GI issues - and for something to do while we come on (already cleaned the house!)
5:20 A little buzzy in the tea isle mildly anxious. On the walk home, time lapses begin - I see the corner a hundred yards up...suddenly I'm there - interesting.
5:50 Home. We decide tobacco would be nice to mix in a joint. Not really smokers, there's none in the house. Solo back in the car to the liquor store - yeah, not the wisest. Driving the 1/3 mile was easy with a bit of concentration. Standing in line while some sorority sisters buy an unfathomable amount of vodka was a challenge. Easy to keep the lid on, but I keep thinking 'I'm tripping balls...'. The early rumblings of many a phychedelic are familiar...yet without loss of ego - no fear to speak of.
6:15 Home. Recently redecorated a room purely for solace...we retire there and put on some beautiful spiritual music (Om Shanti, she chants) my partner is fond of. It fits right in and I'm quite appreciative of the melodies...this disk spins for the next 3 hours with only the occasional 'we just heard this' observation; no desire to find other tunes. Feeling and visualizing very psilocybin, without, again, any ego challenge. A few pieces of ginger here and there keep the stomach at bay - when the opportunity again arises, there will be a significant fast. Another cap of G, and, after being a bit concerned it might be overwhelming, a few hits of herb. It's not. It's great, in fact. Just play, and the play continues to grow.
7:00 Giggling and realizing and saying 'I create, I create, don't forget!, I create...' The room is a sparkling enchanted forest, like fireflies in every direction. The colors are brilliant, and the lights keep going up and down and up and down - alive. I am a biological entity who creates a perception into this universe and am very thrilled to be here. Heaven. My parter and I are understanding this together; speaking without talking; talking joyfully - and effectively able to discuss those moments when, out of unconcious patterns, we unwilling twist the flow. An 'issue' is a hard-wired circuit in the gray matter that automatically ellicits a response to a given situation that does not produce the currently desired result. We can work with that!
7:30+ Time is lost. A little more G and herb. The cigarrettes are pretty disgusting - not like on MDMA at all. No fiending; no smoking out of duress (sometimes on LSD or fungi). The nicotine buzz is almost not pleasureable at all. The room is a feast of sparkling color - everything is moving, flowing, lovely; my partner smiles and is unimagineablly beautiful. Occasionally there is self-doubt, and it manifests until I recall that I CREATE. Oh yeah! This is incredibly friggin' fun...and it's back. I'd read the trip reports about 2cb taking you where you lead, and it's no doubt the case. Not unnaturally happy; happy when I choose/allow. Brillant. Consume the last 5mg each.
Pee break...she's first. I'm standing in the dark living room alone, stretching my shoulders between the kitchen doorway - my heart opens. An old friend is sitting in our chair...Rastafari...I hear breath and am the tiniest bit afraid, new to such otherworldliness. I have not seen spirits before, or at least not recognized them. We say hello; right on. All is well.
Much bodywork over the evening...both of us have some demons. I can move energy so easily and we both feel it...hands off, healing. Amazing, she says.
Later...The play continues for hours, much longer than I expect. Nice. I don't NEED it to go on, but appreciate that it does. We make love, and it's wonderful. To the sounds of an elfin princess singing '...love some, weep some, dance for joy...' Play again!
Tired now, not unpleasantly so...trying to have enough G for solid sleep, but it really doesn't seem to have an effect. Sleep comes, and it's nice too...
Next Morning: Rested well. 8 hours. No residual fatigue. The message is intact - I create. This is a fantastic chemical; choose for it to take you somewhere and it will. Easy on the body and enlightening for the mind. I fondly look forward to my next immersion. Eat little, or none at all. Choose your setting well. It plays again...'love some, weep some, dance for joy!'
Namaste
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Tablet of Vision:
The Tablet lies still as if there was no change.
The correct Resonance Amulet is obtainable at the Imperial Tomb or the Shrine of the Loyal.


--- title: "Progress" date: 2021-04-29T16:00:58+02:00 draft: false main_title: "Tailwind progress bars" subheading: "" seo_title: "Tailwind progress bar component - examples & templates" description: "Responsive progress bars built with Tailwind. Progress bar is an indicator showing the completion progress, i.e. task or time. Use it with percents, steps & other options." image: "" video: "" url: "/docs/standard/components/progress/" menu: components: name: "Progress" --- {{< example lang="html" title="Basic example">}}


Primary Schema Files
The following files are the primary schemas defined for JSON resources conforming to the Redfish Specification. Each schema definition is available in both CSDL (XML) and json-schema formats. A .ZIP archive (DSP8010) containing all of current schema files (both CSDL and json-schema) can be downloaded from the Redfish Standards page at: http://www.dmtf.org/standards/redfish
| AccountService [csdl] [json-schema] | v1.3.0 | The AccountService schema contains properties for managing user accounts. The properties are common to all user accounts, such as password requirements, and control features such as account lockout. The schema also contains links to the collections of Manager Accounts and Roles. |
| ActionInfo [csdl] [json-schema] | v1.0.3 | The ActionInfo schema describes the parameters and other information necessary to perform a Redfish Action on a particular Action target. Parameter support can differ between vendors and even between instances of a resource. This data can be used to ensure Action requests from applications contain supported parameters. |


My first page
Xavier Parra
Teacher, front end developer, interactive artist.
Inicio
Personal
Projects
CV
well, I am starting to learn html and tagging a bit so here we are hope everyone is having fun.


| Team | 1st | 2nd | Final |
|---|---|---|---|
| Kanata Renovations | 0 | 3 | 3 |
| Urban Stone Surfaces | 4 | 3 | 7 |
| First Period | ||
|---|---|---|
| 7:26 | Urban Stone Surfaces | 11 Greg O'Hearn ( 12 Darryl Burwash ) |
| 4:41 | Urban Stone Surfaces | 3 Jeff Boyce |
| 3:47 | Urban Stone Surfaces | 5 Jim Murphy ( 12 Darryl Burwash ) |
| 0:08 | Urban Stone Surfaces | 11 Greg O'Hearn ( 12 Darryl Burwash ) |
| Second Period | ||
| 22:24 | Kanata Renovations | 12 Yvon Legault ( 5 Tim Stupich, 4 Mark Smith ) |
| 17:10 | Kanata Renovations | 5 Tim Stupich ( 9 Steve Williams, 7 John MacMaster ) |
| 9:27 | Urban Stone Surfaces | 5 Jim Murphy ( 19 Gerry Guevara, 18 Lorne Bean ) |
| 7:53 | Urban Stone Surfaces | 12 Darryl Burwash ( 11 Greg O'Hearn ) |
| 7:12 | Kanata Renovations | 6 Pat Aubrey ( 3 Dan Ellsworth, 19 Lloyd Cosman ) |
| 3:16 | Urban Stone Surfaces | 19 Gerry Guevara ( 6 Hal Mott, 18 Lorne Bean ) |
| First Period | ||
|---|---|---|
| 13:22 | Urban Stone Surfaces | 18 Lorne Bean Body Checking |
| Second Period | ||
| 1:28 | Kanata Renovations | 12 Yvon Legault Holding |
| Player | G | A | P | PIM | |
|---|---|---|---|---|---|
| 5 | Tim Stupich | 1 | 1 | 2 | 0 |
| 12 | Yvon Legault | 1 | 0 | 1 | 2 |
| 6 | Pat Aubrey | 1 | 0 | 1 | 0 |
| 3 | Dan Ellsworth | 0 | 1 | 1 | 0 |
| 7 | John MacMaster | 0 | 1 | 1 | 0 |
| 19 | Lloyd Cosman | 0 | 1 | 1 | 0 |
| 4 | Mark Smith | 0 | 1 | 1 | 0 |
| 9 | Steve Williams | 0 | 1 | 1 | 0 |
| 10 | Aaron Carswell | 0 | 0 | 0 | 0 |
| 11 | Anthony Hunter | 0 | 0 | 0 | 0 |
| 8 | Gord Scott | 0 | 0 | 0 | 0 |
| 2 | Jonathan Lapp | 0 | 0 | 0 | 0 |
| 1 | William Yap (G) (SPARE) | 0 | 0 | 0 | 0 |
| 31 | Al Bergeron (G) (SCRATCH) |
| Player | G | A | P | PIM | |
|---|---|---|---|---|---|
| 12 | Darryl Burwash | 1 | 3 | 4 | 0 |
| 11 | Greg O'Hearn | 2 | 1 | 3 | 0 |
| 5 | Jim Murphy | 2 | 0 | 2 | 0 |
| 19 | Gerry Guevara | 1 | 1 | 2 | 0 |
| 18 | Lorne Bean | 0 | 2 | 2 | 2 |
| 3 | Jeff Boyce | 1 | 0 | 1 | 0 |
| 6 | Hal Mott | 0 | 1 | 1 | 0 |
| 9 | Alain Bernard | 0 | 0 | 0 | 0 |
| 1 | Dwayne Newans (G) | 0 | 0 | 0 | 0 |
| 2 | Simon Forknall | 0 | 0 | 0 | 0 |
| 88 | Steve Lamarche | 0 | 0 | 0 | 0 |
| 4 | Bob Star (SCRATCH) | ||||
| 7 | Jeff Edwards (SCRATCH) |


This field is required.
This field should be at least 1.
This field cannot be more than 10.
This field should be a number.


Garlic cloves, peeled (see Tip)
Olive oil or avocado oil
Himalayan salt
Fresh herb sprigs, such as thyme, rosemary, oregano, or sage
Preheat the oven to 250°F.
Put as many garlic cloves as you like in a small baking dish with a lid (a cocotte is perfect for this), leaving at least an inch of space at the top.
Pour in the olive oil until the garlic is just submerged. Sprinkle in a little salt and place a few sprigs of herbs on top. Cover with the lid and place on a sheet pan to prevent a mess.
Pop it in the oven and bake for 1 hour, or until you can easily pierce the garlic cloves with a fork. Remove from the oven and let it cool to room temperature.
Transfer all of the garlic with the oil and herbs to an airtight glass or ceramic storage container. Store in the fridge for up to 3 months. Always use a clean spoon to remove garlic cloves or oil.
PER 2 TABLESPOONS: Calories 169 • Fat 18.5 g • Total Carbohydrate 1.5 g • Dietary Fiber 0 g • Protein 0.2 g


nips nips2008 nips2008-238 nips2008-238-reference knowledge-graph by maker-knowledge-mining
Source: pdf
Author: Zakria Hussain, John S. Shawe-taylor
Abstract: We analyse matching pursuit for kernel principal components analysis (KPCA) by proving that the sparse subspace it produces is a sample compression scheme. We show that this bound is tighter than the KPCA bound of Shawe-Taylor et al [7] and highly predictive of the size of the subspace needed to capture most of the variance in the data. We analyse a second matching pursuit algorithm called kernel matching pursuit (KMP) which does not correspond to a sample compression scheme. However, we give a novel bound that views the choice of subspace of the KMP algorithm as a compression scheme and hence provide a VC bound to upper bound its future loss. Finally we describe how the same bound can be applied to other matching pursuit related algorithms. 1
[1] M. Anthony. Partitioning points by parallel planes. Discrete Mathematics, 282:17–21, 2004.
[2] S. Floyd and M. Warmuth. Sample compression, learnability, and the Vapnik-Chervonenkis dimension. Machine Learning, 21(3):269–304, 1995.
[3] N. Littlestone and M. K. Warmuth. Relating data compression and learnability. Technical report, University of California Santa Cruz, Santa Cruz, CA, 1986.
[4] S. Mallat and Z. Zhang. Matching pursuit with time-frequency dictionaries. IEEE Transactions on Signal Processing, 41(12):3397–3415, 1993.
[5] B. Sch¨ lkopf and A. Smola. Learning with Kernels. MIT Press, Cambridge, MA, 2002. o
[6] J. Shawe-Taylor and N. Cristianini. Kernel Methods for Pattern Analysis. Cambridge University Press, Cambridge, U.K., 2004.
[7] J. Shawe-Taylor, C. K. I. Williams, N. Cristianini, and J. Kandola. On the eigenspectrum of the Gram matrix and the generalization error of kernel-PCA. IEEE Transactions on Information Theory, 51(7):2510–2522, 2005.
[8] A. J. Smola and B. Sch¨ lkopf. Sparse greedy matrix approximation for machine learning. In o Proceedings of 17th International Conference on Machine Learning, pages 911–918. Morgan Kaufmann, San Francisco, CA, 2000.
[9] V. N. Vapnik and A. Y. Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities. Theory of Probability and its Applications, 16(2):264–280, 1971.
[10] P. Vincent and Y. Bengio. Kernel matching pursuit. Machine Learning, 48:165–187, 2002.
[11] C. K. I. Williams and M. Seeger. Using the Nystr¨ m method to speed up kernel machines. In o Advances in Neural Information Processing Systems, volume 13, pages 682–688. MIT Press, 2001. 8


top
|
up
|
prev
|
next
NonreferenceTypeConstraintNode Class
Definition at line
406
of
Concept.hpp
Constructors
NonreferenceTypeConstraintNode
()
NonreferenceTypeConstraintNode
(
const
Span& span_,
const
boost::uuids::uuid& moduleId_)
Member Functions
void
Accept
(
Visitor
& visitor)
override
Node
*
Clone
(
CloneContext
& cloneContext)
const override
Constructor Details
NonreferenceTypeConstraintNode Constructor
sngcm::ast::NonreferenceTypeConstraintNode::NonreferenceTypeConstraintNode()
Definition at line
1027
of
Concept.cpp
:
1027
:
IntrinsicConstraintNode
(
NodeType
::
nonreferenceTypeConstraintNode
)
1028
{
1029
}
Declaration at line
409
of
Concept.hpp
NonreferenceTypeConstraintNode Constructor
sngcm::ast::NonreferenceTypeConstraintNode::NonreferenceTypeConstraintNode(
const
Span& span_,
const
boost::uuids::uuid& moduleId_)
Definition at line
1031
of
Concept.cpp
:
1031
:
IntrinsicConstraintNode
(
NodeType
::
nonreferenceTypeConstraintNode
)
1032
{
1033
}
Declaration at line
410
of
Concept.hpp
Member Function Details
Accept Member Function
void
sngcm::ast::NonreferenceTypeConstraintNode::Accept(
Visitor
& visitor)
override
Definition at line
1035
of
Concept.cpp
:
1036
{
1037
visitor
.
Visit
(
*
this
)
;
1038
}
Declaration at line
411
of
Concept.hpp
Base class overridden functions:
sngcm::ast::Node::Accept
Calls:
sngcm::ast::Visitor::Visit
Clone Member Function
Node
* sngcm::ast::NonreferenceTypeConstraintNode::Clone(
CloneContext
& cloneContext)
const override
Definition at line
1040
of
Concept.cpp
:
1041
{
1042
return
new
NonreferenceTypeConstraintNode
(
)
;
1043
}
Declaration at line
412
of
Concept.hpp
Base class overridden functions:
sngcm::ast::Node::Clone
top
|
up
|
prev
|
next


Get real rose-wood guitars at reasonably great price
Amazingly wishes you a brand new season of music. Be ready to rock n roll in this new season. Get all music instruments and accessories at reasonable price here.
Wish you a Happy Musical Day!
We bring an awesome combination of beats and music. Dont forget to check our drums section.
 We bring you an awesome collection of brand new keyboards.
Rs 20,000Rs 1000/month EMIno offers
Rs 20,000Rs 1000/month EMIno offers
Rs 20,000Rs 1000/month EMIno offers
Rs 20,000Rs 1000/month EMIno offers
Get best guitar from best brands at excellent price and offers.
Rs 15,000Rs 1000/month EMI15%off
Rs 9,000Rs 400/month EMIno offers
Rs 16,000Rs 1000/month EMI30% off
Rs 8,000Rs 400/month EMIno offers
Who doesn't know about the sound of Krishna's flute?? Discover the Krishna in yourself through our brand new collection of best quality flutes.


World Coordinate Systems¶
The World Coordinate System (or WCS) is the traditional term for the mapping from pixel coordinates to the coordinate system on the sky. (I know, the world’s down here, and the sky’s up there, so you’d think it would be reversed, but that’s the way it goes. Astronomy is full of terms that don’t quite make sense when you look at them too closely.)
There are two kinds of world coordinates that we use here:
Celestial coordinates are defined in terms of right ascension (RA) and declination (Dec). They are a spherical coordinate system on the sky, akin to longitude and latitude on Earth. cf. http://en.wikipedia.org/wiki/Celestial_coordinate_system
Euclidean coordinates are defined relative to a tangent plane projection of the sky. If you imagine the sky coordinates on an actual sphere with a particular radius, then the tangent plane is tangent to that sphere. We use the labels (u,v) for the coordinates in this system, where +v points north and +u points west. (Yes, west, not east. As you look up into the sky, if north is up, then west is to the right.)
The classes in this file provide a mapping from image coordinates (in pixels) to one of these
two kinds of world coordinates. We use the labels (x,y)
for the image coordinates.
WCS Base Classes¶
-
class
galsim.
BaseWCS
[source]¶ The base class for all other kinds of WCS transformations.
All the functions the user will typically need are defined here. Most subclasses just define helper functions to implement each particular WCS definition. So this base class defines the common interface for all WCS classes.
There are several types of WCS classes that we implement. The basic class hierarchy is:
BaseWCS --- EuclideanWCS --- UniformWCS --- LocalWCS --- CelestialWCS
These base classes are not constructible. They do not have __init__ defined.
LocalWCS classes are those which really just define a pixel size and shape. They implicitly have the origin in image coordinates correspond to the origin in world coordinates. They are primarily designed to handle local transformations at the location of a single galaxy, where it should usually be a good approximation to consider the pixel shape to be constant over the size of the galaxy.
Currently we define the following LocalWCS classes:
- PixelScale - ShearWCS - JacobianWCS
UniformWCS classes have a constant pixel size and shape, but they have an arbitrary origin in both image coordinates and world coordinates. A LocalWCS class can be turned into a non-local UniformWCS class when an image has its bounds changed, e.g. by the commands withCenter(), withOrigin() or shift().
Currently we define the following non-local, UniformWCS classes:
- OffsetWCS - OffsetShearWCS - AffineTransform
EuclideanWCS classes use a regular Euclidean coordinate system for the world coordinates, using PositionD for the world positions. We use the notation (u,v) for the world coordinates and (x,y) for the image coordinates.
Currently we define the following non-uniform, Euclidean WCS class:
- UVFunction
CelestialWCS classes are defined with their world coordinates on the celestial sphere in terms of right ascension (RA) and declination (Dec). The pixel size and shape are always variable. We use CelestialCoord for the world coordinates, which helps facilitate the spherical trigonometry that is sometimes required.
Currently we define the following celestial WCS classes: (The ones in italics are defined in the file fitswcs.py.)
RaDecFunction
AstropyWCS – requires astropy.wcs python module to be installed
PyAstWCS – requires starlink.Ast python module to be installed
WcsToolsWCS – requires wcstools command line functions to be installed
GSFitsWCS – native code, but has less functionality than the above
There is also a factory function called FitsWCS() (also defined in fitswcs.py), which is intended to act like a class initializer. It tries to read a fits file using one of the above classes and returns an instance of whichever one it found was successful. It should always be successful, since its final attempt uses AffineTransform(), which has reasonable defaults when the WCS key words are not in the file, but of course this will only be a very rough approximation of the true WCS.
Some things you can do with a WCS instance:
Convert positions between image coordinates and world coordinates (sometimes referred to as sky coordinates):
>>> world_pos = wcs.toWorld(image_pos) >>> image_pos = wcs.toImage(world_pos)
Note: the transformation from world to image coordinates is not guaranteed to be implemented. If it is not implemented for a particular WCS class, a NotImplementedError will be raised.
The
image_pos
parameter should be a PositionD. However,world_pos
will be a CelestialCoord if the transformation is in terms of celestial coordinates (ifwcs.isCelestial() == True
). Otherwise, it will be a PositionD as well.Convert a GSObject that is defined in world coordinates to the equivalent profile defined in terms of image coordinates (or vice versa):
>>> image_profile = wcs.toImage(world_profile) >>> world_profile = wcs.toWorld(image_profile)
For non-uniform WCS types (for which
wcs.isUniform() == False
), these need either animage_pos
orworld_pos
parameter to say where this conversion should happen:>>> image_profile = wcs.toImage(world_profile, image_pos=image_pos)
Construct a local linear approximation of a WCS at a given location:
>>> local_wcs = wcs.local(image_pos = image_pos) >>> local_wcs = wcs.local(world_pos = world_pos)
If
wcs.toWorld(image_pos)
is not implemented for a particular WCS class, then a NotImplementedError will be raised if you pass in aworld_pos
argument.The returned
local_wcs
is usually a JacobianWCS instance, but see the doc string for local() for more details.Construct a full affine approximation of a WCS at a given location:
>>> affine_wcs = wcs.affine(image_pos = image_pos) >>> affine_wcs = wcs.affine(world_pos = world_pos)
This preserves the transformation near the location of
image_pos
, but it is linear, so the transformed values may not agree as you get farther from the given point.The returned
affine_wcs
is always an AffineTransform instance.Get some properties of the pixel size and shape:
>>> area = local_wcs.pixelArea() >>> min_linear_scale = local_wcs.minLinearScale() >>> max_linear_scale = local_wcs.maxLinearScale() >>> jac = local_wcs.jacobian() >>> # Use jac.dudx, jac.dudy, jac.dvdx, jac.dvdy
Non-uniform WCS types also have these functions, but for them, you must supply either
image_pos
orworld_pos
. So the following are equivalent:>>> area = wcs.pixelArea(image_pos) >>> area = wcs.local(image_pos).pixelArea()
Query some overall attributes of the WCS transformation:
>>> wcs.isLocal() # is this a local WCS? >>> wcs.isUniform() # does this WCS have a uniform pixel size/shape? >>> wcs.isCelestial() # are the world coordinates on the celestial sphere? >>> wcs.isPixelScale() # is this either a PixelScale or an OffsetWCS?
-
affine
(image_pos=None, world_pos=None, color=None)[source]¶ Return the local AffineTransform of the WCS at a given point.
This returns a linearized version of the current WCS at a given point. It returns an AffineTransform that is locally approximately the same as the WCS in the vicinity of the given point.
It is similar to jacobian(), except that this preserves the offset information between the image coordinates and world coordinates rather than setting both origins to (0,0). Instead, the image origin is taken to be
image_pos
.For non-celestial coordinate systems, the world origin is taken to be
wcs.toWorld(image_pos)
. In fact,wcs.affine(image_pos)
is really just shorthand for:>>> wcs.jacobian(image_pos).withOrigin(image_pos, wcs.toWorld(image_pos))
For celestial coordinate systems, there is no well-defined choice for the origin of the Euclidean world coordinate system. So we just take (u,v) = (0,0) at the given position. So,
wcs.affine(image_pos)
is equivalent to:>>> wcs.jacobian(image_pos).withOrigin(image_pos)
You can use the returned AffineTransform to access the relevant values of the 2x2 Jacobian matrix and the origins directly:
>>> affine = wcs.affine(image_pos) >>> x,y = np.meshgrid(np.arange(0,32,1), np.arange(0,32,1)) >>> u = affine.dudx * (x-affine.x0) + jac.dudy * (y-affine.y0) + affine.u0 >>> v = affine.dvdx * (x-affine.x0) + jac.dvdy * (y-affine.y0) + affine.v0 >>> # ... use u,v values to work directly in sky coordinates.
As usual, you may provide either
image_pos
orworld_pos
as you prefer to specify the location at which to approximate the WCS.- Parameters
image_pos – The image coordinate position (for non-uniform WCS types)
world_pos – The world coordinate position (for non-uniform WCS types)
color – For color-dependent WCS’s, the color term for which to evaluate the local affine transform. [default: None]
- Returns
an AffineTransform instance
-
fixColor
(color)[source]¶ Fix the color to a particular value.
This changes a color-dependent WCS into the corresponding color-independent WCS for the given color.
- Parameters
color – The value of the color term to use.
- Returns
the new color-independent WCS
-
isCelestial
()[source]¶ Return whether the world coordinates are CelestialCoord (i.e. ra,dec).
wcs.isCelestial()
is shorthand forisinstance(wcs, galsim.CelestialWCS)
.
-
isLocal
()[source]¶ Return whether the WCS transformation is a local, linear approximation.
wcs.isLocal()
is shorthand forisinstance(wcs, galsim.LocalWCS)
.
-
isPixelScale
()[source]¶ Return whether the WCS transformation is a simple PixelScale or OffsetWCS.
These are the simplest two WCS transformations. PixelScale is local and OffsetWCS is non-local. If an Image has one of these WCS transformations as its WCS, then
im.scale
works to read and write the pixel scale. If not,im.scale
will raise a TypeError exception.wcs.isPixelScale()
is shorthand forisinstance(wcs, (galsim.PixelScale, galsim.OffsetWCS))
.
-
isUniform
()[source]¶ Return whether the pixels in this WCS have uniform size and shape.
wcs.isUniform()
is shorthand forisinstance(wcs, galsim.UniformWCS)
.
-
jacobian
(image_pos=None, world_pos=None, color=None)[source]¶ Return the local JacobianWCS of the WCS at a given point.
This is basically the same as local(), but the return value is guaranteed to be a JacobianWCS, which can be useful in some situations, since you can access the values of the 2x2 Jacobian matrix directly:
>>> jac = wcs.jacobian(image_pos) >>> x,y = np.meshgrid(np.arange(0,32,1), np.arange(0,32,1)) >>> u = jac.dudx * x + jac.dudy * y >>> v = jac.dvdx * x + jac.dvdy * y >>> # ... use u,v values to work directly in world coordinates.
If you do not need the extra functionality, then you should use local() instead, since it may be more efficient.
- Parameters
image_pos – The image coordinate position (for non-uniform WCS types)
world_pos – The world coordinate position (for non-uniform WCS types)
color – For color-dependent WCS’s, the color term for which to evaluate the local jacobian. [default: None]
- Returns
a JacobianWCS instance.
-
local
(image_pos=None, world_pos=None, color=None)[source]¶ Return the local linear approximation of the WCS at a given point.
- Parameters
image_pos – The image coordinate position (for non-uniform WCS types)
world_pos – The world coordinate position (for non-uniform WCS types)
color – For color-dependent WCS’s, the color term for which to evaluate the local WCS. [default: None]
- Returns
a LocalWCS instance.
-
makeSkyImage
(image, sky_level, color=None)[source]¶ Make an image of the sky, correctly accounting for the pixel area, which might be variable over the image.
- Note: This uses finite differences of the wcs mapping to calculate the area of each
pixel in world coordinates. It is usually pretty accurate everywhere except within a few arcsec of the north or south poles.
- Parameters
image – The image onto which the sky values will be put.
sky_level – The sky level in ADU/arcsec^2 (or whatever your world coordinate system units are, if not arcsec).
color – For color-dependent WCS’s, the color term to use for making the sky image. [default: None]
-
maxLinearScale
(image_pos=None, world_pos=None, color=None)[source]¶ Return the maximum linear scale of the transformation in any direction.
This is basically the semi-major axis of the Jacobian. Sometimes you need a linear scale size for some calculation. This function returns the largest scale in any direction. The function minLinearScale() returns the smallest.
For non-uniform WCS transforms, you must provide either
image_pos
orworld_pos
to say where the pixel is located.- Parameters
image_pos – The image coordinate position (for non-uniform WCS types)
world_pos – The world coordinate position (for non-uniform WCS types)
color – For color-dependent WCS’s, the color term for which to evaluate the scale. [default: None]
- Returns
the maximum pixel area in any direction in arcsec.
-
minLinearScale
(image_pos=None, world_pos=None, color=None)[source]¶ Return the minimum linear scale of the transformation in any direction.
This is basically the semi-minor axis of the Jacobian. Sometimes you need a linear scale size for some calculation. This function returns the smallest scale in any direction. The function maxLinearScale() returns the largest.
For non-uniform WCS transforms, you must provide either
image_pos
orworld_pos
to say where the pixel is located.- Parameters
image_pos – The image coordinate position (for non-uniform WCS types)
world_pos – The world coordinate position (for non-uniform WCS types)
color – For color-dependent WCS’s, the color term for which to evaluate the scale. [default: None]
- Returns
the minimum pixel area in any direction in arcsec.
-
pixelArea
(image_pos=None, world_pos=None, color=None)[source]¶ Return the area of a pixel in arcsec**2 (or in whatever units you are using for world coordinates if it is a EuclideanWCS).
For non-uniform WCS transforms, you must provide either
image_pos
orworld_pos
to say where the pixel is located.- Parameters
image_pos – The image coordinate position (for non-uniform WCS types)
world_pos – The world coordinate position (for non-uniform WCS types)
color – For color-dependent WCS’s, the color term for which to evaluate the pixel area. [default: None]
- Returns
the pixel area in arcsec**2.
-
posToImage
(world_pos, color=None)[source]¶ Convert a position from world coordinates to image coordinates.
This is equivalent to
wcs.toImage(world_pos)
.- Parameters
world_pos – The world coordinate position
color – For color-dependent WCS’s, the color term to use. [default: None]
-
posToWorld
(image_pos, color=None, **kwargs)[source]¶ Convert a position from image coordinates to world coordinates.
This is equivalent to
wcs.toWorld(image_pos)
.- Parameters
image_pos – The position in image coordinates
color – For color-dependent WCS’s, the color term to use. [default: None]
project_center – (Only valid for CelestialWCS) A CelestialCoord to use for projecting the result onto a tangent plane world system rather than returning a CelestialCoord. [default: None]
projection – If project_center != None, the kind of projection to use. See CelestialCoord.project for the valid options. [default: ‘gnomonic’]
- Returns
world_pos
-
profileToImage
(world_profile, image_pos=None, world_pos=None, color=None, flux_ratio=1.0, offset=(0, 0))[source]¶ Convert a profile from world coordinates to image coordinates.
This is equivalent to
wcs.toImage(world_profile, ...)
.- Parameters
world_profile – The profile in world coordinates to transform.
image_pos – The image coordinate position (for non-uniform WCS types)
world_pos – The world coordinate position (for non-uniform WCS types)
color – For color-dependent WCS’s, the color term to use. [default: None]
flux_ratio – An optional flux scaling to be applied at the same time. [default: 1]
offset – An optional offset to be applied at the same time. [default: 0,0]
-
profileToWorld
(image_profile, image_pos=None, world_pos=None, color=None, flux_ratio=1.0, offset=(0, 0))[source]¶ Convert a profile from image coordinates to world coordinates.
This is equivalent to
wcs.toWorld(image_profile, ...)
.- Parameters
image_profile – The profile in image coordinates to transform.
image_pos – The image coordinate position (for non-uniform WCS types)
world_pos – The world coordinate position (for non-uniform WCS types)
color – For color-dependent WCS’s, the color term to use. [default: None]
flux_ratio – An optional flux scaling to be applied at the same time. [default: 1]
offset – An optional offset to be applied at the same time. [default: 0,0]
-
toImage
(*args, **kwargs)[source]¶ Convert from world coordinates to image coordinates
There are essentially three overloaded versions of this function here.
The first converts a position from world coordinates to image coordinates. If the WCS is a EuclideanWCS, the argument may be either a PositionD or PositionI argument. If it is a CelestialWCS, then the argument must be a CelestialCoord. It returns the corresponding position in image coordinates as a PositionD:
>>> image_pos = wcs.toImage(world_pos)
Equivalent to wcs.posToImage(world_pos).
The second is nearly the same, but takes either u and v values or ra and dec values (depending on the kind of wcs being used) directly and returns x and y values. For this version, the inputs may be numpy arrays, in which case the returned values are also numpy arrays:
>>> x, y = wcs.toImage(u, v) # For EuclideanWCS types >>> x, y = wcs.toImage(ra, dec, units=units) # For CelestialWCS types
Equivalent to wcs.uvToxy(u, v) or wcs.radecToxy(ra, dec, units=units).
The third converts a surface brightness profile (a GSObject) from world coordinates to image coordinates, returning the profile in image coordinates as a new GSObject. For non-uniform WCS transforms, you must provide either
image_pos
orworld_pos
to say where the profile is located so the right transformation can be performed. And optionally, you may provide a flux scaling to be performed at the same time:>>> image_profile = wcs.toImage(world_profile, image_pos=None, world_pos=None, flux_ratio=1, offset=(0,0))
Equivalent to wcs.profileToImage(world_profile, …).
-
toWorld
(*args, **kwargs)[source]¶ Convert from image coordinates to world coordinates.
There are essentially three overloaded versions of this function here.
The first converts a position from image coordinates to world coordinates. The argument may be either a PositionD or PositionI argument. It returns the corresponding position in world coordinates as a PositionD if the WCS is a EuclideanWCS, or a CelestialCoord if it is a CelestialWCS:
>>> world_pos = wcs.toWorld(image_pos)
Equivalent to
wcs.posToWorld(image_pos)
.The second is nearly the same, but takes x and y values directly and returns either u, v or ra, dec, depending on the kind of wcs being used. For this version, x and y may be numpy arrays, in which case the returned values are also numpy arrays:
>>> u, v = wcs.toWorld(x, y) # For EuclideanWCS types >>> ra, dec = wcs.toWorld(x, y, units=units) # For CelestialWCS types
Equivalent to
wcs.xyTouv(x, y)
orwcs.xyToradec(x, y)
.The third converts a surface brightness profile (a GSObject) from image coordinates to world coordinates, returning the profile in world coordinates as a new GSObject. For non-uniform WCS transforms, you must provide either
image_pos
orworld_pos
to say where the profile is located, so the right transformation can be performed. And optionally, you may provide a flux scaling to be performed at the same time:>>> world_profile = wcs.toWorld(image_profile, image_pos=None, world_pos=None, flux_ratio=1, offset=(0,0))
Equivalent to
wcs.profileToWorld(image_profile, ...)
.
-
withOrigin
(origin, world_origin=None, color=None)[source]¶ Recenter the current WCS function at a new origin location, returning the new WCS.
This function creates a new WCS instance (always a non-local WCS) that treats the origin position the same way the current WCS treats (x,y) = (0,0).
If the current WCS is a local WCS, this essentially declares where on the image you want the origin of the world coordinate system to be. i.e. where is (u,v) = (0,0). So, for example, to set a WCS that has a constant pixel size with the world coordinates centered at the center of an image, you could write:
>>> wcs = galsim.PixelScale(scale).withOrigin(im.center)
This is equivalent to the following:
>>> wcs = galsim.OffsetWCS(scale, origin=im.center)
For non-local WCS types, the origin defines the location in the image coordinate system should mean the same thing as (x,y) = (0,0) does for the current WCS. The following example should work regardless of what kind of WCS this is:
>>> world_pos1 = wcs.toWorld(PositionD(0,0)) >>> wcs2 = wcs.withOrigin(new_origin) >>> world_pos2 = wcs2.toWorld(new_origin) >>> # world_pos1 should be equal to world_pos2
Furthermore, if the current WCS is a EuclideanWCS (wcs.isCelestial() == False) you may also provide a
world_origin
argument which defines what (u,v) position you want to correspond to the new origin. Continuing the previous example:>>> wcs3 = wcs.withOrigin(new_origin, new_world_origin) >>> world_pos3 = wcs3.toWorld(new_origin) >>> # world_pos3 should be equal to new_world_origin
- Parameters
origin – The image coordinate position to use as the origin.
world_origin – The world coordinate position to use as the origin. Only valid if wcs.isCelestial() == False. [default: None]
color – For color-dependent WCS’s, the color term to use in the connection between the current origin and world_origin. [default: None]
- Returns
the new recentered WCS
-
writeToFitsHeader
(header, bounds)[source]¶ Write this WCS function to a FITS header.
This is normally called automatically from within the galsim.fits.write() function.
The code will attempt to write standard FITS WCS keys so that the WCS will be readable by other software (e.g. ds9). It may not be able to do so accurately, in which case a linearized version will be used instead. (Specifically, it will use the local affine transform with respect to the image center.)
However, this is not necessary for the WCS to survive a round trip through the FITS header, as it will also write GalSim-specific key words that should allow it to reconstruct the WCS correctly.
Caveat: For UVFunction and RaDecFunction, if the functions are real python functions (rather than a string that is converted to a function), then the mechanism we use to convert the function to a string that can be written to the header has a few limitations.
It apparently only works for cpython implementations.
It probably won’t work to write from one version of python and read from another. (At least for major version differences.)
If the function uses globals, you’ll need to make sure the globals are present when you read it back in as well, or it probably won’t work.
It looks really ugly in the header.
We haven’t thought much about the security implications of this, so beware using GalSim to open FITS files from untrusted sources.
- Parameters
header – A FitsHeader (or dict-like) object to write the data to.
bounds – The bounds of the image.
-
class
galsim.wcs.
 We use the CelestialCoord class for the world coordinates.
-
isCelestial
()[source]¶ Return whether the world coordinates are CelestialCoord (i.e. ra,dec).
wcs.isCelestial()
is shorthand forisinstance(wcs, galsim.CelestialWCS)
.
-
radecToxy
(ra, dec, units, color=None)[source]¶ Convert ra,dec from world coordinates to image coordinates.
This is equivalent to
wcs.toWorld(ra,dec, units=units)
.It is also equivalent to
wcs.posToImage(galsim.CelestialCoord(ra * units, dec * units))
when ra and dec are scalars; however, this routine allows ra and dec to be numpy arrays, in which case, the calculation will be vectorized, which is often much faster than using the pos interface.- Parameters
ra – The ra value(s) in world coordinates
dec – The dec value(s) in world coordinates
units – The units to use for the input ra, dec values.
color – For color-dependent WCS’s, the color term to use. [default: None]
-
xyToradec
(x, y, units=None, color=None)[source]¶ Convert x,y from image coordinates to world coordinates.
This is equivalent to
wcs.toWorld(x,y, units=units)
.It is also equivalent to
wcs.posToWorld(galsim.PositionD(x,y)).rad
when x and y are scalars if units is ‘radians’; however, this routine allows x and y to be numpy arrays, in which case, the calculation will be vectorized, which is often much faster than using the pos interface.- Parameters
x – The x value(s) in image coordinates
y – The y value(s) in image coordinates
units – (Only valid for CelestialWCS, in which case it is required) The units to use for the returned ra, dec values.
color – For color-dependent WCS’s, the color term to use. [default: None]
- Returns
ra, dec
-
-
class
galsim.wcs.
 We usually use the notation (u,v) to refer to positions in world coordinates, and they use the class PositionD.
-
uvToxy
(u, v, color=None)[source]¶ Convert u,v from world coordinates to image coordinates.
This is equivalent to
wcs.toWorld(u,v)
.It is also equivalent to
wcs.posToImage(galsim.PositionD(u,v))
when u and v are scalars; however, this routine allows u and v to be numpy arrays, in which case, the calculation will be vectorized, which is often much faster than using the pos interface.- Parameters
u – The u value(s) in world coordinates
v – The v value(s) in world coordinates
color – For color-dependent WCS’s, the color term to use. [default: None]
-
xyTouv
(x, y, units=None, color=None)[source]¶ Convert x,y from image coordinates to world coordinates.
This is equivalent to
wcs.toWorld(x,y)
.It is also equivalent to
wcs.posToWorld(galsim.PositionD(x,y))
when x and y are scalars; however, this routine allows x and y to be numpy arrays, in which case, the calculation will be vectorized, which is often much faster than using the pos interface.- Parameters
x – The x value(s) in image coordinates
y – The y value(s) in image coordinates
units – (Only valid for CelestialWCS, in which case it is required) The units to use for the returned ra, dec values.
color – For color-dependent WCS’s, the color term to use. [default: None]
- Returns
ra, dec
-
-
class
galsim.wcs.
UniformWCS
[source]¶ A UniformWCS is a EuclideanWCS which has a uniform pixel size and shape.
Euclidean WCS’s¶
-
class
galsim.
PixelScale
(scale)[source]¶ This is the simplest possible WCS transformation. It only involves a unit conversion from pixels to arcsec (or whatever units you want to take for your world coordinate system).
The conversion functions are:
u = x * scale v = y * scale
A PixelScale is initialized with the command:
>>> wcs = galsim.PixelScale(scale)
- Parameters
scale – The pixel scale, typically in units of arcsec/pixel.
-
isPixelScale
()[source]¶ Return whether the WCS transformation is a simple PixelScale or OffsetWCS.
These are the simplest two WCS transformations. PixelScale is local and OffsetWCS is non-local. If an Image has one of these WCS transformations as its WCS, then
im.scale
works to read and write the pixel scale. If not,im.scale
will raise a TypeError exception.wcs.isPixelScale()
is shorthand forisinstance(wcs, (galsim.PixelScale, galsim.OffsetWCS))
.
-
class
galsim.
OffsetWCS
(scale, origin=None, world_origin=None)[source]¶ This WCS is similar to PixelScale, except the origin is not necessarily (0,0) in both the image and world coordinates.
The conversion functions are:
u = (x-x0) * scale + u0 v = (y-y0) * scale + v0
An OffsetWCS is initialized with the command:
>>> wcs = galsim.OffsetWCS(scale, origin=None, world_origin=None)
- Parameters
scale – The pixel scale, typically in units of arcsec/pixel.
origin – Optional origin position for the image coordinate system. If provided, it should be a PositionD or PositionI. [default: PositionD(0., 0.)]
world_origin – Optional origin position for the world coordinate system. If provided, it should be a PositionD. [default: galsim.PositionD(0., 0.)]
-
isPixelScale
()[source]¶ Return whether the WCS transformation is a simple PixelScale or OffsetWCS.
These are the simplest two WCS transformations. PixelScale is local and OffsetWCS is non-local. If an Image has one of these WCS transformations as its WCS, then
im.scale
works to read and write the pixel scale. If not,im.scale
will raise a TypeError exception.wcs.isPixelScale()
is shorthand forisinstance(wcs, (galsim.PixelScale, galsim.OffsetWCS))
.
-
class
galsim.
ShearWCS
(scale, shear)[source]¶ This WCS is a uniformly sheared coordinate system.
The shear is given as the shape that a round object has when observed in image coordinates.
The conversion functions in terms of (g1,g2) are therefore:
x = (u + g1 u + g2 v) / scale / sqrt(1-g1**2-g2**2) y = (v - g1 v + g2 u) / scale / sqrt(1-g1**2-g2**2)
or, writing this in the usual way of (u,v) as a function of (x,y):
u = (x - g1 x - g2 y) * scale / sqrt(1-g1**2-g2**2) v = (y + g1 y - g2 x) * scale / sqrt(1-g1**2-g2**2)
A ShearWCS is initialized with the command:
>>> wcs = galsim.ShearWCS(scale, shear)
- Parameters
scale – The pixel scale, typically in units of arcsec/pixel.
shear – The shear, which should be a Shear instance.
The Shear transformation conserves object area, so if the input
scale == 1
then the transformation represented by the ShearWCS will conserve object area also.
-
class
galsim.
OffsetShearWCS
(scale, shear, origin=None, world_origin=None)[source]¶ This WCS is a uniformly sheared coordinate system with image and world origins that are not necessarily coincident.
The conversion functions are:
x = ( (1+g1) (u-u0) + g2 (v-v0) ) / scale / sqrt(1-g1**2-g2**2) + x0 y = ( (1-g1) (v-v0) + g2 (u-u0) ) / scale / sqrt(1-g1**2-g2**2) + y0
u = ( (1-g1) (x-x0) - g2 (y-y0) ) * scale / sqrt(1-g1**2-g2**2) + u0 v = ( (1+g1) (y-y0) - g2 (x-x0) ) * scale / sqrt(1-g1**2-g2**2) + v0
An OffsetShearWCS is initialized with the command:
>>> wcs = galsim.OffsetShearWCS(scale, shear, origin=None, world_origin=None)
- Parameters
scale – The pixel scale, typically in units of arcsec/pixel.
shear – The shear, which should be a Shear instance.
origin – Optional origin position for the image coordinate system. If provided, it should be a PositionD or PositionI. [default: PositionD(0., 0.)]
world_origin – Optional origin position for the world coordinate system. If provided, it should be a PositionD. [default: PositionD(0., 0.)]
-
class
galsim.
JacobianWCS
(dudx, dudy, dvdx, dvdy)[source]¶ This WCS is the most general local linear WCS implementing a 2x2 Jacobian matrix.
The conversion functions are:
u = dudx x + dudy y v = dvdx x + dvdy y
A JacobianWCS has attributes dudx, dudy, dvdx, dvdy that you can access directly if that is convenient. You can also access these as a NumPy array directly with:
>>> J = jac_wcs.getMatrix()
Also, JacobianWCS has another method that other WCS classes do not have. The call:
>>> scale, shear, theta, flip = jac_wcs.getDecomposition()
will return the equivalent expansion, shear, rotation and possible flip corresponding to this transformation. See the docstring for that method for more information.
A JacobianWCS is initialized with the command:
>>> wcs = galsim.JacobianWCS(dudx, dudy, dvdx, dvdy)
- Parameters
dudx – du/dx
dudy – du/dy
dvdx – dv/dx
dvdy – dv/dy
-
getDecomposition
()[source]¶ Get the equivalent expansion, shear, rotation and possible flip corresponding to this Jacobian transformation.
A non-singular real matrix can always be decomposed into a symmetric positive definite matrix times an orthogonal matrix:
M = P Q
In our case, P includes an overall scale and a shear, and Q is a rotation and possibly a flip of (x,y) -> (y,x).
( dudx dudy ) = scale/sqrt(1-g1^2-g2^2) ( 1+g1 g2 ) ( cos(theta) -sin(theta) ) F ( dvdx dvdy ) ( g2 1-g1 ) ( sin(theta) cos(theta) )
- where F is either the identity matrix, ( 1 0 ), or a flip matrix, ( 0 1 ).
( 0 1 ) ( 1 0 )
If there is no flip, then this means that the effect of:
>>> prof.transform(dudx, dudy, dvdx, dvdy)
is equivalent to:
>>> prof.rotate(theta).shear(shear).expand(scale)
in that order. (Rotation and shear do not commute.)
The decomposition is returned as a tuple: (scale, shear, theta, flip), where scale is a float, shear is a Shear, theta is an Angle, and flip is a bool.
-
class
galsim.
AffineTransform
(dudx, dudy, dvdx, dvdy, origin=None, world_origin=None)[source]¶ This WCS is the most general linear transformation. It involves a 2x2 Jacobian matrix and an offset. You can provide the offset in terms of either the
image_pos
(x0,y0) where (u,v) = (0,0), or theworld_pos
(u0,v0) where (x,y) = (0,0). Or, in fact, you may provide both, in which case theimage_pos
(x0,y0) corresponds to theworld_pos
(u0,v0).The conversion functions are:
u = dudx (x-x0) + dudy (y-y0) + u0 v = dvdx (x-x0) + dvdy (y-y0) + v0
An AffineTransform has attributes dudx, dudy, dvdx, dvdy, x0, y0, u0, v0 that you can access directly if that is convenient.
An AffineTransform is initialized with the command:
>>> wcs = galsim.AffineTransform(dudx, dudy, dvdx, dvdy, origin=None, world_origin=None)
- Parameters
dudx – du/dx
dudy – du/dy
dvdx – dv/dx
dvdy – dv/dy
origin – Optional origin position for the image coordinate system. If provided, it should be a PositionD or PositionI. [default: PositionD(0., 0.)]
world_origin – Optional origin position for the world coordinate system. If provided, it should be a PositionD. [default: PositionD(0., 0.)]
-
class
galsim.
UVFunction
(ufunc, vfunc, xfunc=None, yfunc=None, origin=None, world_origin=None, uses_color=False)[source]¶ This WCS takes two arbitrary functions for u(x,y) and v(x,y).
- The ufunc and vfunc parameters may be:
python functions that take (x,y) arguments
python objects with a __call__ method that takes (x,y) arguments
strings which can be parsed with eval(‘lambda x,y: ‘+str)
You may also provide the inverse functions x(u,v) and y(u,v) as xfunc and yfunc. These are not required, but if you do not provide them, then any operation that requires going from world to image coordinates will raise a NotImplementedError.
Note: some internal calculations will be faster if the functions can take NumPy arrays for x,y and output arrays for u,v. Usually this does not require any change to your function, but it is worth keeping in mind. For example, if you want to do a sqrt, you may be better off using
numpy.sqrt
rather thanmath.sqrt
.A UVFunction is initialized with the command:
>>> wcs = galsim.UVFunction(ufunc, vfunc, origin=None, world_origin=None)
- Parameters
ufunc – The function u(x,y)
vfunc – The function v(x,y)
xfunc – The function x(u,v) (optional)
yfunc – The function y(u,v) (optional)
origin – Optional origin position for the image coordinate system. If provided, it should be a PositionD or PositionI. [default: PositionD(0., 0.)]
Optional origin position for the world coordinate system. (world_origin) – If provided, it should be a PositionD. [default: PositionD(0., 0.)]
uses_color – If True, then the functions take three parameters (x,y,c) or (u,v,c) where the third term is some kind of color value. (The exact meaning of “color” here is user-defined. You just need to be consistent with the color values you use when using the wcs.) [default: False]
Celestial WCS’s¶
-
class
galsim.
RaDecFunction
(ra_func, dec_func=None, origin=None)[source]¶ This WCS takes an arbitrary function for the Right Ascension (ra) and Declination (dec).
In many cases, it can be more convenient to calculate both ra and dec in a single function, since there will typically be intermediate values that are common to both, so it may be more efficient to just calculate those once and thence calculate both ra and dec. Thus, we provide the option to provide either a single function or two separate functions.
- The function parameters used to initialize an RaDecFunction may be:
a python functions that take (x,y) arguments
a python object with a __call__ method that takes (x,y) arguments
a string which can be parsed with eval(‘lambda x,y: ‘+str)
The return values, ra and dec, should be given in _radians_.
The first argument is called
ra_func
, but ifdec_func
is omitted, then it is assumed to calculate both ra and dec. The two values should be returned as a tuple (ra,dec).We don’t want a function that returns Angles, because we want to allow for the possibility of using NumPy arrays as inputs and outputs to speed up some calculations. The function isn’t _required_ to work with NumPy arrays, but it is possible that some things will be faster if it does. If it were expected to return Angles, then it definitely couldn’t work with arrays.
An RaDecFunction is initialized with either of the following commands:
>>> wcs = galsim.RaDecFunction(radec_func, origin=None) >>> wcs = galsim.RaDecFunction(ra_func, dec_func, origin=None)
- Parameters
ra_func – If
dec_func
is also given: A function ra(x,y) returning ra in radians. Ifdec_func=None
: A function returning a tuple (ra,dec), both in radians.dec_func – Either a function dec(x,y) returning dec in radians, or None (in which case
ra_func
is expected to return both ra and dec. [default: None]origin – Optional origin position for the image coordinate system. If provided, it should be a PositionD or PositionI. [default: PositionD(0., 0.)]
-
class
galsim.
AstropyWCS
(file_name=None, dir=None, hdu=None, header=None, compression='auto', wcs=None, origin=None)[source]¶ This WCS uses astropy.wcs to read WCS information from a FITS file. It requires the astropy.wcs python module to be installed.
Astropy may be installed using pip, fink, or port:
>>> pip install astropy >>> fink install astropy-py27 >>> port install py27-astropy
It also comes by default with Enthought and Anaconda. For more information, see their website:
An AstropyWCS is initialized with one of the following commands:
>>> wcs = galsim.AstropyWCS(file_name=file_name) # Open a file on disk >>> wcs = galsim.AstropyWCS(header=header) # Use an existing pyfits header >>> wcs = galsim.AstropyWCS(wcs=wcs) # Use an existing astropy.wcs.WCS instance
Exactly one of the parameters
file_name
,header
orwcs
is required. Also, since the most common usage will probably be the first, you can also give afile_name
without it being named:>>> wcs = galsim.AstropyWCS(file_name)
- Parameters
file_name – The FITS file from which to read the WCS information. This is probably the usual parameter to provide. [default: None]
dir – Optional directory to prepend to
file_name
. [default: None]hdu – Optionally, the number of the HDU to use if reading from a file. The default is to use either the primary or first extension as appropriate for the given compression. (e.g. for rice, the first extension is the one you normally want.) [default: None]
header – The header of an open pyfits (or astropy.io) hdu. Or, it can be a FitsHeader object. [default: None]
compression – Which decompression scheme to use (if any). See galsim.fits.read() for the available options. [default: ‘auto’]
wcs – An existing astropy.wcs.WCS instance [default: None]
origin – Optional origin position for the image coordinate system. If provided, it should be a PositionD or PositionI. [default: None]
-
class
galsim.
PyAstWCS
(file_name=None, dir=None, hdu=None, header=None, compression='auto', wcsinfo=None, origin=None)[source]¶ This WCS uses PyAst (the python front end for the Starlink AST code) to read WCS information from a FITS file. It requires the starlink.Ast python module to be installed.
Starlink may be installed using pip:
>>> pip install starlink-pyast
For more information, see their website:
https://pypi.python.org/pypi/starlink-pyast/
A PyAstWCS is initialized with one of the following commands:
>>> wcs = galsim.PyAstWCS(file_name=file_name) # Open a file on disk >>> wcs = galsim.PyAstWCS(header=header) # Use an existing pyfits header >>> wcs = galsim.PyAstWCS(wcsinfo=wcsinfo) # Use an existing starlink.Ast.FrameSet
Exactly one of the parameters
file_name
,header
orwcsinfo
is required. Also, since the most common usage will probably be the first, you can also give a file name without it being named:>>> wcs = galsim.PyAstWCS(file_name)
- Parameters
file_name – The FITS file from which to read the WCS information. This is probably the usual parameter to provide. [default: None]
dir – Optional directory to prepend to
file_name
. [default: None]hdu – Optionally, the number of the HDU to use if reading from a file. The default is to use either the primary or first extension as appropriate for the given compression. (e.g. for rice, the first extension is the one you normally want.) [default: None]
header – The header of an open pyfits (or astropy.io) hdu. Or, it can be a FitsHeader object. [default: None]
compression – Which decompression scheme to use (if any). See galsim.fits.read() for the available options. [default:’auto’]
wcsinfo – An existing starlink.Ast.FrameSet [default: None]
origin – Optional origin position for the image coordinate system. If provided, it should be a PositionD or PositionI. [default: None]
-
class
galsim.
WcsToolsWCS
(file_name, dir=None, origin=None)[source]¶ This WCS uses wcstools executables to perform the appropriate WCS transformations for a given FITS file. It requires wcstools command line functions to be installed.
Note: It uses the wcstools executables xy2sky and sky2xy, so it can be quite a bit less efficient than other options that keep the WCS in memory.
See their website for information on downloading and installing wcstools:
A WcsToolsWCS is initialized with the following command:
>>> wcs = galsim.WcsToolsWCS(file_name)
- Parameters
file_name – The FITS file from which to read the WCS information.
dir – Optional directory to prepend to
file_name
. [default: None]origin – Optional origin position for the image coordinate system. If provided, it should be a PositionD or PositionI. [default: None]
-
class
galsim.
GSFitsWCS
(file_name=None, dir=None, hdu=None, header=None, compression='auto', origin=None, _data=None)[source]¶ This WCS uses a GalSim implementation to read a WCS from a FITS file.
It doesn’t do nearly as many WCS types as the other options, and it does not try to be as rigorous about supporting all possible valid variations in the FITS parameters. However, it does several popular WCS types properly, and it doesn’t require any additional python modules to be installed, which can be helpful.
Currrently, it is able to parse the following WCS types: TAN, STG, ZEA, ARC, TPV, TNX
A GSFitsWCS is initialized with one of the following commands:
>>> wcs = galsim.GSFitsWCS(file_name=file_name) # Open a file on disk >>> wcs = galsim.GSFitsWCS(header=header) # Use an existing pyfits header
Also, since the most common usage will probably be the first, you can also give a file name without it being named:
>>> wcs = galsim.GSFitsWCS(file_name)
In addition to reading from a FITS file, there is also a factory function that builds a GSFitsWCS object implementing a TAN projection. See the docstring of TanWCS() for more details.
- Parameters
file_name – The FITS file from which to read the WCS information. This is probably the usual parameter to provide. [default: None]
dir – Optional directory to prepend to
file_name
. [default: None]hdu – Optionally, the number of the HDU to use if reading from a file. The default is to use either the primary or first extension as appropriate for the given compression. (e.g. for rice, the first extension is the one you normally want.) [default: None]
header – The header of an open pyfits (or astropy.io) hdu. Or, it can be a FitsHeader object. [default: None]
compression – Which decompression scheme to use (if any). See galsim.fits.read() for the available options. [default: ‘auto’]
origin – Optional origin position for the image coordinate system. If provided, it should be a PositionD or PositionI. [default: None]
-
galsim.
FitsWCS
(file_name=None, dir=None, hdu=None, header=None, compression='auto', text_file=False, suppress_warning=False)[source]¶ This factory function will try to read the WCS from a FITS file and return a WCS that will work. It tries a number of different WCS classes until it finds one that succeeds in reading the file.
If none of them work, then the last class it tries, AffineTransform, is guaranteed to succeed, but it will only model the linear portion of the WCS (the CD matrix, CRPIX, and CRVAL), using reasonable defaults if even these are missing. If you think that you have the right software for one of the WCS types, but FitsWCS still defaults to AffineTransform, it may be helpful to update your installation of astropy and/or starlink (if you don’t already have the latest version).
Note: The list of classes this function will try may be edited, e.g. by an external module that wants to add an additional WCS type. The list is
galsim.fitswcs.fits_wcs_types
.- Parameters
file_name – The FITS file from which to read the WCS information. This is probably the usual parameter to provide. [default: None]
dir – Optional directory to prepend to
file_name
. [default: None]hdu – Optionally, the number of the HDU to use if reading from a file. The default is to use either the primary or first extension as appropriate for the given compression. (e.g. for rice, the first extension is the one you normally want.) [default: None]
header – The header of an open pyfits (or astropy.io) hdu. Or, it can be a FitsHeader object. [default: None]
compression – Which decompression scheme to use (if any). See galsim.fits.read() for the available options. [default: ‘auto’]
text_file – Normally a file is taken to be a fits file, but you can also give it a text file with the header information (like the .head file output from SCamp). In this case you should set
text_file = True
to tell GalSim to parse the file this way. [default: False]suppress_warning – Should a warning be emitted if none of the real FITS WCS classes are able to successfully read the file, and we have to reset to an AffineTransform instead? [default: False] (Note: this is set to True when this function is implicitly called from one of the galsim.fits.read* functions.)
-
galsim.
TanWCS
(affine, world_origin, units=coord.arcsec)[source]¶ This is a function that returns a GSFitsWCS object for a TAN WCS projection.
The TAN projection is essentially an affine transformation from image coordinates to Euclidean (u,v) coordinates on a tangent plane, and then a “deprojection” of this plane onto the sphere given a particular RA, Dec for the location of the tangent point. The tangent point will correspond to the location of (u,v) = (0,0) in the intermediate coordinate system.
- Parameters
affine – An AffineTransform defining the transformation from image coordinates to the coordinates on the tangent plane.
world_origin – A CelestialCoord defining the location on the sphere where the tangent plane is centered.
units – The angular units of the (u,v) intermediate coordinate system. [default: galsim.arcsec]
- Returns
a GSFitsWCS describing this WCS.
WCS Utilities¶
-
galsim.wcs.
readFromFitsHeader
(header)[source]¶ Read a WCS function from a FITS header.
This is normally called automatically from within the galsim.fits.read() function, but you can also call it directly as
wcs, origin = galsim.wcs.readFromFitsHeader(header)
If the file was originally written by GalSim using one of the galsim.fits.write() functions, then this should always succeed in reading back in the original WCS. It may not end up as exactly the same class as the original, but the underlying world coordinate system transformation should be preserved.
Caveat: For UVFunction and RaDecFunction, if the functions that were written to the FITS header were real python functions (rather than a string that is converted to a function), then the mechanism we use to write to the header and read it back in has some limitations:
It apparently only works for cpython implementations.
It probably won’t work to write from one version of python and read from another. (At least for major version differences.)
If the function uses globals, you’ll need to make sure the globals are present when you read it back in as well, or it probably won’t work.
It looks really ugly in the header.
We haven’t thought much about the security implications of this, so beware using GalSim to open FITS files from untrusted sources.
If the file was not written by GalSim, then this code will do its best to read the WCS information in the FITS header. Depending on what kind of WCS is encoded in the header, this may or may not be successful.
If there is no WCS information in the header, then this will default to a pixel scale of 1.
In addition to the wcs, this function will also return the image origin that the WCS is assuming for the image. If the file was originally written by GalSim, this should correspond to the original image origin. If not, it will default to (1,1).
- Parameters
header – The fits header to write the data to.
- Returns
a tuple (wcs, origin) of the wcs from the header and the image origin.


Toys from Trash
Photo and quotes from Toy Story Times of India story
Some people talk about trying to change the world, then there are people like Arvind Gupta who have spend the last 30 years doing so. A graduate of IIT, Gupta left a promising career as a Telco engineer, to teach science. After seeing expensive UNICEF science kits left unopened, for fear of being damaged, Gupta realized that teachers needed to be able to make things themselves to be able to teach well. Ascribing to a view point that, “Science is not hardware, it is a viewpoint,” he began to create “toys” from everyday items, often trash, to teach children scientific concepts with the underlying belief that a more expensive education does not necessarily translate into a better one. Gupta and his team at the Children’s Science Centre at the University of Pune’s amazing work can be found on the incredible Toys from Trash website.
When I see project’s like the simple electric motor, I can’t help but wonder how many more William Kamkwamba’s we would we have if teachers had access to Gupta “toys” in rural African schools.
When not designing new toys, Gupta also translates books into Hindi (100+ books!) which he posts for free on his website. I need to file Arvind Gupta in the back of my mind for the next time I am feeling lazy!
comments powered by Disqus