READFITS undefined in IDL - undefined

I just started working with IDL for my summer undergraduate lab, so I'm still kinda new to the program.
I've been trying to load a FITS file to analyze the data into the program, but for some reason IDL won't recognize the instruction of "READFITS".
My input is:
image = readfits('test.fits', h, /NOSCALE)
I get the following error:
% Attempt to call undefined procedure/function: READFITS
I've looked for alternative way to load FITS files, or if I need to install an additional package, but apparently the instruction should be already with IDL.

READFITS is not part of IDL. It is part of the IDL Astronomy User's Library. Download it and add it to IDL's !path.

Or after downloading it as #mgalloy suggested, keep it in the current working directory since IDL will search the current directory for it as well.

Related

Fatal error (13): No program entry point with XDS Modula-2?

I'm using the current bundled binaries from https://github.com/excelsior-oss/xds (as of 12/6/2020) with just the most basic Hello World MOD file:
MODULE HelloWorld;
FROM STextIO IMPORT WriteLn, WriteString;
BEGIN
WriteString("Hello, World!");
WriteLn;
END HelloWorld.
xc HelloWorld.mod works fine for compiling it to object. However, I'm not clear on the exact syntax for xlink on a standalone MOD file. xlink HelloWorld.obj will at least get it to try with my object file, but as the error shows, it doesn't know the entrypoint. I've tried setting the entry point with the /ENTRY switch, but no luck doing it by module name. I've also tried setting the /SYS to console, but again, no luck there.
I feel there's some trivial linker option or program directive needed, but I'm just not finding it via Google...
To build a binary, use: xc =a =make HelloWorld.mod
The above is found in https://github.com/excelsior-oss/xds/blob/master/Sources/Doc/Comp/src/usage.tex .
It is unfortunate that XDS did not put PDFs of their documentation on github. I suggest building the documentation from their LaTeX files.
Edit: I since learnt that the Wayback Machine has archived the XDS documentation here: https://web.archive.org/web/20060705213825/http://www.excelsior-usa.com/xdsdoc.html

nsys says "please use the qdrep file instead" - huh?

I'm using NVIDIA Nsight Systems version 2019.5.2.16-b54ef97 with CUDA 10.2. I'm running:
nsys profile my_app --some --args=here
so, a plain-vanilla profiling with no funny business. And yet, I get, at the bottom of the output:
... etc. etc. ...
Saving report to file "/some/where/report1.qdrep"
Report file saved.
Please discard the qdstrm file and use the qdrep file instead.
Removed /some/where/report1.qdstrm as it was successfully imported.
Please use the qdrep file instead.
Why am I being told to discard files and use other files instead? Especially given how, eventually, only a single file is generated (a .qdrep file)?
I'm guessing some internal conversion utility is run, and the message is not really intended for me - or am I missing something?
It is just a logging, which is a little confusing though, and later it removes the *.qdstrm file for you automatically.

Cloudconnect CSV buffer size

When I try to load a big CSV from a zip file, the execution log give me the following error:
----------------------------------------- Error details ------------------------------------------
Component [Clientes:CLIENTES1] finished with status ERROR.
The size of data buffer is only 100663296. Set appropriate parameter in defaultProperties file.
--------------------------------------------------------------------------------------------------
How can I set the appropriate parameter in defaultProperties file?
I tried this link, but my cloudconnect run configurations page is different from the link:
I've created the parameters file and filled the additional parameters with the right values like said the tutorial (code bellow) and the same error appear in the screen.
Name: -config; Value: new_buffer_size.txt
The new_buffer_size.txt content have just this line:DEFAULT_INTERNAL_IO_BUFFER_SIZE = 200000000
How can I solve this problem? I need to solve this before the world explodes.
CloudConnect is designed to develop ETL(s), which can be run on GoodData cloud workers and therefore some lower level settings are surpassed as in this case. The only legitimate way is to modify the ETL the way it can process the data with current settings. Regarding to docs, the referenced article is outdated. GoodData docs team is aware if it and they are preparing docs refactoring.
Note: As you have probably noticed, CloudConnect is being powered by Javlin's Clover ETL, therefore feel free to check their forums, as you would find there how to overcome the issue on lower level (no UI), but it would work only for data processing on the local machine.

First time coding and confused - Echo

Apologies for incredible ignorance. First time ever looking at or trying coding in any form and all naturally a bit confusing and overwhelming.
Trying to keep it super basic I'm attempting to build something basic for Amazon Echo by working through this article - https://developer.amazon.com/blogs/post/Tx3DVGG0K0TPUGQ/updated-alexa-skills-kit-fact-template-step-by-step-guide-to-build-a-fact-skill
Have got to Step 2.3
Once you have the source downloaded [done], node installed and npm updated, you are ready to install the ASK-SDK. Install this in the same directory as your src/index.js file for your skill. Change the directory to the src directory of your skill, and then in the command line, type: npm install --save alexa-sdk
I've moved the SDK into the same folder as the source - in downloads folder. Am confused on changing the directory to the same as my skill. As far as I know there is no skill yet so not sure where to move it to.
When type in npm install --save alexa-sdk
returns
npm WARN enoent ENOENT: no such file or directory, open '/Users/OwenLee/package.json'
npm WARN OwenLee No description
npm WARN OwenLee No repository field.
npm WARN OwenLee No README data
npm WARN OwenLee No license field.
working on a mac so don't really know how/where to access this, but assuming this is where i need to move the files to?
Very sorry for baby-basic knowledge. Just trying to at least get a foot in the door as know need to learn this stuff but everything i read seems to assume i already have a working knowledge of coding : S
any help would be awesome - inc. any advice on steps after that you can probably see i'll trip up on
thanks!!
oven121
So as far as the directory /Users/OwenLee/ this would be your home folder on a Mac. The Root / of your HDD can be reached through Finder by clicking on Macintosh HD (or whatever you named your main hard drive) in the side bar. If you open up a new Terminal window it will be the directory that the terminal starts in. You should be able to fix your problem by taking the file packages.json, which should be wherever you downloaded the SDK to, and placing it in your home folder, then re-running the command.
Now don't let me change your mind if you're truly committed, but if you have absolutely no experience with programming I would recommend starting with something a bit simpler than Java or Javascript. Object oriented languages can be both very convoluted and difficult to get the hang of for beginners (I personally have been writing native languages like C for years and am just now starting to understand how Java works.).
If it is an option I recommend starting with a language that your Mac has built in support for. Perhaps start with Bash scripting or Apple Script making basic scripts to do things you find tedious to do manually in a terminal, or get to know the basics of processor-native languages like C & C++ by making some basic programmes to display text when it is run, or to ask the user to type something, and say back what they typed. Finally since you are on a Mac you can get Xcode for free in the app store, it will configure itself and you could play around with it to learn how macOS handles windows, perhaps start by making a basic programme window with a few buttons that do different things when clicked.
If you have any interest in my suggestions you can find some info about bash scripting here: https://linuxconfig.org/bash-scripting-tutorial the tutorial says it assumes the reader has no previous knowledge of Bash, and most commands should work fine in the version of Bash built into your Mac's Terminal app.
If you take more interest in C++ this is the site that I used to learn to write it, and learn how native languages work: http://www.cplusplus.com/doc/tutorial/
Finally here is a basic C++ programme called "Hello World", it is somewhat of an initiation rite of C/C++ students to write this programme and learn how each part of it works:
//HelloWorld.cpp the double slash tells the compiler and user that everything after it on this line is a comment, not code//
#include <iostream> //The octothorp '#' lets the compiler know it needs to use the library named inside the pointed brackets '</>' when it builds the programme. 'iostream' stands for In-Out Stream, and handles basic text, and basic processor commands//
using namespace std; //This line tells the compiler that any line that says to show text or ask the user to type something should use regular text and not a special format//
int main() //'int' stands for integer, any time you make a variable that contains only an integer you should put this in front of it's name, and 'main' is the name of the integer. The empty parentheses tells the compiler that this is a function, rather than a number//
{ //The open curly bracket '{' tells the compiler where the function starts
cout<<"Hello World"; //'cout' stands for 'character out' and is for showing basic text in the terminal window. The double pointy 'out' brackets '<<' tells the compiler that the text should be sent out of the programme rather than loaded into a variable, the text inside the quotes is what will be shown on the screen, and the semi colon tells the compiler where the command ends, it has to be put at the end of any command that is inside of a function//
return 0 //The command 'return' is for telling the compiler whether or not an error has occurred, 0 means the programme ran fine, 1 means something went wrong, either way the programme closes when it runs the command 'return'//
} //the closed curly bracket tells the compiler where the function ends//
Good luck with your programming, and if you have any questions unrelated to this thread please feel free to private message me, or create a new question and tag me in it so that I get notified.

igraph for python

I'm thoroughly confused about how to read/write into igraph's Python module. What I'm trying right now is:
g = igraph.read("football.gml")
g.write_svg("football.svg", g.layout_circle() )
I have a football.gml file, and this code runs and writes a file called football.svg. But when I try to open it using InkScape, I get an error message saying the file cannot be loaded. Is this the correct way to write the code? What could be going wrong?
The write_svg function is sort of deprecated; it was meant only as a quick hack to allow SVG exports from igraph even if you don't have the Cairo module for Python. It has not been maintained for a while so it could be the case that you hit a bug.
If you have the Cairo module for Python (on most Linux systems, you can simply install it from an appropriate package), you can simply do this:
igraph.plot(g, "football.svg", layout="circle")
This would use Cairo's SVG renderer, which is likely to generate the correct result. If you cannot install the Cairo module for Python for some reason, please file a bug report on https://bugs.launchpad.net/igraph so we can look into this.
(Even better, please file a bug report even if you managed to make it work using igraph.plot).
Couple years late, but maybe this will be helpful to somebody.
The write_svg function seems not to escape ampersands correctly. Texas A&M has an ampersand in its label -- InkScape is probably confused because it sees & rather than &. Just open football.svg in a text editor to fix that, and you should be golden!